[Template-haskell] example of derive using Template Haskell?
S. Alexander Jacobson
alex at alexjacobson.com
Tue Jan 11 12:35:40 EST 2005
I have {-# OPTIONS -fglasgow-exts #-} at the top
of both modules. Does that not imply -fth?
I do realize that my example is not valid Haskell
code. I am looking for an example of valid
Haskell code that allows me to derive a class.
Or even just an example of actualy usage of
[d|...] that works with GHC 6.2.2!
SO far I haven't been able to find one.
-Alex-
On Tue, 11 Jan 2005, Lemmih wrote:
> 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
>
______________________________________________________________
S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
More information about the template-haskell
mailing list