title: How to view the generated code for derived instances / deriving in Haskell
body: <p>So, in Haskell, it's really easy to do this:</p>
  
  <pre><code>data Foo = Bar | Baz
      deriving (Read, Show)
  </code></pre>
  
  <p>This is great, but I'd like to be able to pass some data as a string from Haskell to the Elm language. The languages are similar enough that, if I had a Haskell implementation of Read, I could easily convert it to Elm by hand.</p>
  
  <p>The problem is, when I use deriving, the function is automatically generated, but I can't actually see what it does.</p>
  
  <p>I'm wondering, is there a way to automatically generate the code for parsing and showing using Read and Show, so that I could actually see the code itself?</p>