[Template-haskell] example of derive using Template Haskell?

Lemmih lemmih at gmail.com
Tue Jan 11 12:19:52 EST 2005


On Tue, 11 Jan 2005 11:19:47 -0500 (Eastern Standard Time), S.
Alexander Jacobson <alex at alexjacobson.com> wrote:
> I understand that '[d|...|]' creates a Q [Dec],
> but in practice GHC 6.2.2 interprets it as a
> syntax error.  Do I need to do something to enable
> it?
[...]

>From the user guide: "You need to use the flag -fth to switch these
syntactic extensions on (-fth is currently implied by -fglasgow-exts,
but you are encouraged to specify it explicitly).", but you have to
realize that your example is not valid Haskell code.

-- 
Friendly,
  Lemmih


More information about the template-haskell mailing list