On Thu, Sep 4, 2008 at 2:52 PM, Philippa Cowderoy <[EMAIL PROTECTED]> wrote:
> Would writing Haskell to generate the C via Language.C be an option?
> Effectively you'd be using Haskell as a typeful macro system.

Interesting idea, and I've done similar things with haskelldb
(generating  SQL queries). Looking at the package, I think would be
pretty painful though. It seems I'd have to build the AST by hand, and
it doesn't seem to incorporate any type information in the AST items.
In haskelldb, every expression carries its type around in a phantom
type, which protects you from trying to compare a bool and a string,
for intstance. I don't see anything similar in Language.C. I may be
mistaken though!

Justin
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to