That's what I had originally. However, some people have made critical
comments about CPP macros on this list and I thought that TH was
considered the better option.
I was one of those people advising against the use of CPP macros.
However, Template Haskell is ghc-only, and is unlikely ever to be
implemented by any other Haskell compiler. Thus CPP, for all its
faults, may be the better solution here, simply because it is portable.
(I also note in passing that ghc's core libraries themselves use
exactly this kind of CPP macro to generate lots of tedious boilerplate.)
Regards,
Malcolm
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe