tags:

views:

113

answers:

1

I have the following Template Haskell code in my module, which is part of a larger application.

$(derive makeFoldable ''JStatement)

I suspect that the generated instance of Foldable is not exactly what I originally had in mind, but I can't find a way to verify this. So, preferrably using only ghci, is it possible to view the generated instance?

I tried the following and got a syntax error and I'm guessing this is because I'm Doing It Wrong™.

> derive makeFoldable ''JStatement

<interactive>:1:21:
    lexical error in string/character literal at character '\''
+2  A: 

I figured it out. If you pass -ddump-splices it will print the generated instances to the terminal when compiling the module.

Deniz Dogan