[Haskell-cafe] I love purity, but it's killing me.
Tom Hawkins
tomahawkins at gmail.com
Sun Feb 10 01:45:49 EST 2008
Hi Matt,
On Feb 9, 2008 1:07 PM, Matthew Naylor <mfn-haskell-cafe at cs.york.ac.uk> wrote:
> If you go the real compiler route, would it not make sense to take the
> DSL as the source language rather than Haskell? Or are the DSL and
> Haskell quite similar?
The two are nearly identical. In fact the only significant difference
between the languages is the semantics of top level monad; it wouldn't
be IO, but something else. With the syntax the same, it could
leverage much of Haskell's standard library.
> Or perhaps you are thinking of a two language
> system, where some code is evaluated at compile time by Haskell, and
> some is compiled to the target language?
Not necessarily in the same compilation flow, but I can think of
several scenarios where it would be advantageous for code written in
this other language to be pulled into a conventional Haskell program.
> Taking options 2 or 5 just to solve the sharing problem sounds to me
> like a lot of hard work for little reward. But don't worry, I won't
> repeat my observable sharing speech. :-)
So is the general strategy with observable sharing to use
unsafePerformIO with Data.Unique to label expressions at construction?
Ahh...clever! I did not think of this. Of course, now that you have
me reading up on Yhc.Core, option #5 is looking considerably more fun.
-Tom
More information about the Haskell-Cafe
mailing list