
27 Jun
2003
27 Jun
'03
6:57 p.m.
Can anyone tell me what's wrong with this? -- ghc -fglasgow-exts -c TH.hs module TH where { import Language.Haskell.THSyntax; class HasZero a where { zero :: a; }; aninstance :: TypQ -> Q [Dec]; aninstance t = [d| instance HasZero $t where -- error here { zero = 0; }; |]; $(aninstance [t|Int|]) $(aninstance [t|Integer|]) } $ ghc -fglasgow-exts -c TH.hs TH.hs:14: Malformed context in instance header All I want to do is spin off a number instances for a number of types... -- Ashley Yakeley, Seattle WA
7998
Age (days ago)
7998
Last active (days ago)
1 comments
2 participants
participants (2)
-
Ashley Yakeley
-
Ian Lynagh