
5 Jun
2007
5 Jun
'07
4:24 p.m.
On Mon, Jun 04, 2007 at 10:45:30AM +0100, Neil Mitchell wrote:
On 6/4/07, Simon Peyton-Jones
wrote: Perhaps you mean that reify doesn't work on type constructors? (E.g. reify ''Maybe). It should -- if you think it doesn't can you concoct a test case and submit it?
I'm not sure if I'm doing something wrong, as I haven't managed to get it working for any type constructors. A test case:
ghci -fth Prelude> :m Language.Haskell.TH Language.Haskell.TH> $( reify (mkName "Maybe") >>= error . show )
This works: $( reify ''Maybe >>= runIO . print >> [| 'c' |] ) (modulo printing the result 4 times due to http://hackage.haskell.org/trac/ghc/ticket/1201) I don't think your example is expected to work. Thanks Ian