Giter Club home page Giter Club logo

haskogeneous's People

Contributors

mmirman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

rdmarsh2 amwatson

haskogeneous's Issues

Compiling with GHC

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.

IR

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.

Tuples broken.

Apparently JS doesn't support returning tuples, only passing tuples as arguments. This makes no sense and we need to find a workaround.

Give HTML tags parameters

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."

Modules for JS

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.