2

I'm using Aeson to parse a JSON file in Haskell, and I'm letting Aeson auto-generate the parser by calling deriveJSON. Is there any way to view the code that Aeson generates? I tried calling deriveJSON at the command line, but the result from that function doesn't derive Show, so it won't print. Anyone know how to do this?

stomcavage
  • 1,029
  • 1
  • 13
  • 28

1 Answers1

3

You can pass -ddump-splices to the compiler when compiling your code, which will output the generated parser code to the terminal. See this question that I asked a while ago for more information.

Community
  • 1
  • 1
dflemstr
  • 25,947
  • 5
  • 70
  • 105