I think your looking for this:
http://hackage.haskell.org/packages/archive/template-haskell/latest/doc/html/Language-Haskell-TH-Ppr.html
use pprint or ppr to print template haskell generated code although it's a bit ugly
but I prefer avoiding template haskell personaly such as happstack

2013/7/31 Lee Short <blackcat@pro-ns.net>
I'm working with some Yesod code, and it's complaining about some missing function definitions.  I'd really like to see the code that Template Haskell is outputting -- this is hard to debug otherwise.  The --ddump-splices output is managable at this early stage, but I can't imagine using it once I add more functionality and the code grows.  Is there way to get the template haskell output code?


_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners