mmirman / haskogeneous Goto Github PK
View Code? Open in Web Editor NEWA web framework a bit like GWT but for Haskell
License: BSD 3-Clause "New" or "Revised" License
A web framework a bit like GWT but for Haskell
License: BSD 3-Clause "New" or "Revised" License
We need a more complete set of html tags.
Here is an example of a more complete library: http://hackage.haskell.org/packages/archive/html/1.0.1.2/doc/html/Text-Html.html#t:HTML
At the very least these should compile to javascript.
Rather than writing our own compiler, we should attempt to use the GHC type checker.
This would involve writing a compiler to do a source analysis, and split it into multiple sources:
onServer :: b1 -> ... -> bN -> (b1 -> ... bN -> S a) -> C a
do nm <- askClient
b <- onServer $ do a <- getFromDB nm
return $ parse a
return $ show b
would get converted to
do nm <- askClient
b <- onServer nm $ (\nm -> do a <- getFromDB nm
return $ parse a)
where we figure out what scope nm was defined in automatically by type.
Functions like exprType from the GHC API will be useful.
At the moment, template Haskell is parsed into a form filled with unnecessary syntactic sugar. Why this is the case is beyond me, given that nobody reads the output of template Haskell, but sadly this is the case.
I anticipate the following transformations will be easiest:
Haskell ->
Haskell with no syntactic sugar ->
Lazy lambda calculus with external function calls ->
Strict Javascript abstract representation.
Apparently JS doesn't support returning tuples, only passing tuples as arguments. This makes no sense and we need to find a workaround.
Tags should have more properties, and adding them should be both optional and friendly, something like :
h1 $ do
h1 $ Named "firstElem" $ do
h1 "Typeclasses are a powerful tool for DSL design. You can definitely get this to typecheck."
How does template Haskell handle modules?
Perhaps it would be better to modify the GHC entirely so we can work around the BiMonad style of splitting up compilation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.