[Haskell-cafe] Generating Code

Erik Hesselink hesselink at gmail.com
Fri Dec 9 21:17:25 CET 2011


On Fri, Dec 9, 2011 at 20:45, L Corbijn <aspergesoepje at gmail.com> wrote:
> So I'm interested if there are other libraries that are more suitable
> to the task of generating haskell code for library use, and thus
> generate 'human readable' exported code (so no TH). I'm also
> interested in how other projects generate code for their packages.

Since you ask how other packages solve this problem, and since most
packages use template haskell, I have to ask: why can't you use
template haskell for this?

Another option (also not code generation, but very useful in reducing
boilerplate) is generic programming, for example using the 'regular'
package, or the new generics in GHC 7.2.

Erik



More information about the Haskell-Cafe mailing list