11 Jan
2005
11 Jan
'05
2:45 a.m.
Does [d|...] work in 6.2.2 and if so, how do I enable it? This code gives a syntax error: {-# OPTIONS -fglasgow-exts #-} module Tth where import Language.Haskell.THSyntax import Language.Haskell.Syntax fooFunc = [d|funD "foo" [clause [] (normalB $ litE $ StringL "bar") [] ] |] goo = [|2|] --- {-# OPTIONS -fglasgow-exts #-} import Tth foo = $(goo) $(fooFunc) If I eliminate the d in "[d|" I get an error about Dec conflicting with Exp. I can actually use template Haskell in 6.2.2, can anyone provide an example of deriving a class? -Alex- ______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com