Thanks for that! I don't know yet what would be the easiest way to automatically build up haskell code (Template haskell's Exps or the HsDecls in your link).
Generating is only a part of what i need, though. I would like some feedback from GHC about the generated code (to see if the expressions typecheck, ..) I've been using the Hint package (which calls GHC) to typecheck strings http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hint I've only managed to get it half working. Have you tried this and would this be the best approach? It would be great to get machine-readable error data back from GHC somehow (in stead of an error string). I don't if this is possible. --- On Tue, 10/21/08, Antoine Latter <[EMAIL PROTECTED]> wrote: From: Antoine Latter <[EMAIL PROTECTED]> Subject: Re: [Haskell-cafe] code generation To: [EMAIL PROTECTED] Cc: haskell-cafe@haskell.org Date: Tuesday, October 21, 2008, 3:50 PM 2008/10/20 z ghost <[EMAIL PROTECTED]>: > hello, im interested in using haskell to generate code and make > little AI applications for fun.. > > is anyone already doing this sort of thing? it would be fun to collaborate > with people on this. > I've been doing some work with Haskell code-generation in Haskell, but I've been using the haskell-src package to do it instead of Template Haskell, as I've been generating whole modules at a time. I have a bunch of convenience functions that I use over here: http://community.haskell.org/~aslatter/code/xhb/HaskellCombinators.hs It doesn't have a very consistent API, though. Let me know if you have any questions about it. -Antoine __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe