[Haskell-cafe] Re: Nano-Languages

Vladimir Zlatanov vlado at dikini.net
Thu Dec 10 10:54:14 EST 2009

> If one were to think of this as a project, the initial project goal might be
> a proof of concept, that such an undertaking though non-trivial may be worth
> while.

for me it is currently quite tough, since I don't know the internals at all

> It would be desirable to act on the abstract syntax trees that result from
> the compiler parsing the source code and not the source code itself.

Template Haskell does that - it provides quotations, quasi-quotations
and splicing, along with other utilities.

I would guess that a simple design would be to add an import_syntax
clause, similar to import, but importing only declarations with type
...-> Q ... and splicing automatically their appearances.

This is a back of the envelope design, and I haven't considered any
potential side-effects, but sounds like a reasonable approach

More information about the Haskell-Cafe mailing list