[Haskell-cafe] Automatic derivation (TemplateHaskell?)

Joel Reymont joelr1 at gmail.com
Thu Apr 5 06:04:41 EDT 2007


This is in Language.Haskell.TH.Syntax which is imported at the top of  
Data/Derive/TH.hs so I don't understand the cause of the error

instance Functor Q where
   fmap f (Q x) = Q (fmap f x)

Copying the above into TH.hs gives me

Preprocessing library derive-0.1...
Preprocessing executables for derive-0.1...
Building derive-0.1...
[4 of 9] Compiling Data.Derive.TH   ( Data/Derive/TH.hs, dist/build/ 
Data/Derive/TH.o )

Data/Derive/TH.hs:23:10: Not in scope: data constructor `Q'

Data/Derive/TH.hs:23:17: Not in scope: data constructor `Q'

But Q is exported by Languave.Haskell.TH.Syntax !!!

Any suggestions?

	Thanks, Joel

--
http://wagerlabs.com/







More information about the Haskell-Cafe mailing list