[Haskell-cafe] Automatic derivation (TemplateHaskell?)

Joel Reymont joelr1 at gmail.com
Thu Apr 5 09:47:21 EDT 2007


Here's the output from -ddump-splices (thanks Saizan for the tip).

It's returning a1 instead of a0.

ghci -fth -e '$( _derive_print_instance makeFunParser '"''"'Foo )'  
baz.hs -ddump-splices
baz.hs:1:0:
     baz.hs:1:0: Splicing declarations
         derive makeFunParser 'Foo
       ======>
         baz.hs:30:3-28
         instance {FunParser Main.Foo} where
             []
             { parse = choice
                         [(>>)
                            (reserved ['F', 'o', 'o'])
                            ((>>)
                               (char '(') ((>>=) parse (\ a0 -> (>>)  
(char ')') (return (Main.Foo a1)))))] }

baz.hs:30:3: Not in scope: `a1'

--
http://wagerlabs.com/







More information about the Haskell-Cafe mailing list