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

Henning Thielemann lemming at henning-thielemann.de
Sun Oct 17 13:57:17 EDT 2010

On Sun, 17 Oct 2010, Patai Gergely wrote:

> I'm trying to reuse as much of the sweat and tear put into GHC as
> possible to derive a compiler for a language highly similar to Haskell
> in many aspects. The difference is that instead of constructing an
> expression of type IO (), the programmer has to provide a stream
> processor on the top level - whether this is an arrow structure or just
> a pure function mapping input to output is not decided yet. In other
> words, I want to allow the programmer to use full Haskell as a
> metaprogramming language to create an expression of a much more limited
> language.

And it is not enough to provide just a driver function, that is called in 
'main', say
   run :: IOArrow a b -> a -> IO b

More information about the Haskell-Cafe mailing list