[Template-haskell] unexpected behaviour
François-Régis Sinot
francois-regis.sinot@laposte.net
15 Apr 2003 13:02:55 +0200
> or you could, I think, say
>
> | foo :: Q Dec -> Q ()
> | foo qd = do d<-qd
> | return (out' d)
> |
> | outGen :: Q [Dec]
> | outGen = do let d = reifyDecl Tree
> | dec1<-clause [pvar "x"] (normal [|foo d|]) []
> | return [Fun "out" [dec1]]
>
For info, this does not work either:
ghc gives a "No instance for (Lift Decl)"
(instead of a "No instance for (Lift Dec)"),
which doesn't surprise me.
However, I've got a working solution, and I'm fine with that.
Best wishes,
fr.