[Haskell-cafe] Compiling a DSL on the shoulders of GHC

Patai Gergely patai_gergely at fastmail.fm
Tue Oct 19 08:54:39 EDT 2010

> I have nearly the same plan: I want to compile a restrictive form of
> Haskell to constant time and space C code for hard realtime embedded
> targets.  Except I need a top level monad with different semantics
> than IO.
Which language is that? ImProve?

> Wouldn't a fake driver (fakeRun :: Something -> IO ()) at least
> simplify the problem?  It would prevent you from having to modify GHC
> to handle a different top level type.  And during your evaluation of
> Core, you would simply ignore fakeRun.
I'm not really bothered about the type of main, since I can always just
pick a different unused name for my entry point. In fact, that would
allow me to compile programs both as normal executables for functional
testing (using your fake driver solution) and still pass the Core to the
rest of the pipeline.


http://www.fastmail.fm - Email service worth paying for. Try it for free

More information about the Haskell-Cafe mailing list