[Haskell-cafe] code generation

Mitchell, Neil neil.mitchell.2 at credit-suisse.com
Tue Oct 21 10:15:52 EDT 2008

> > We try to learn functional programs from examples, but our 
> system is 
> > not yet ported to Haskell, though we are working on it. However, we 
> > thought about using TH.
> > 
> > Do you have any pointers to papers, etc. ? You'll find our project, 
> > system and papers here: 
> http://www.cogsys.wiai.uni-bamberg.de/effalip/
> I've only had a quick glance at the description however it 
> looks like you should have a look at derive ( 
> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/derive,
>   http://www-users.cs.york.ac.uk/~ndm/derive/ ) which I think 
> tries to do a similar job.

It has similarities, but there are many differences too. I'd certainly
recommend taking a look around derive to get a feel for how to do
Template Haskell stuff, and to look at the derivation by guess thing -
see the manual, and the paper at:
http://www-users.cs.york.ac.uk/~ndm/derive/ (Deriving Generic Functions
by Example).

I think using Template Haskell for your work would fit very nicely, so
is a good choice to learn :-)

To learn Template Haskell, I recommend you look at the Haddock
documentation page:


And perhaps use Hoogle and a text editor to search around the


Template Haskell is quite large, in that it defines a lot of data types,
but none of it is particularly complex.



Please access the attached hyperlink for an important electronic communications disclaimer: 


More information about the Haskell-Cafe mailing list