evancz/Elm — pull request #458 by maxsnew (2014-01-19 02:23:03+00:00)
Title: Use Pretty instead of Show where Appropriate

When I started writing the quickCheck generator for Exprs, I found that there are a few usages of `Show` that don't print valid Haskell code and are instead used for displaying something to the user. This is really bad for debugging/testing because `Show` is supposed to serialize a data structure into a string of Haskell code that will recreate the same data structure when run.

The few uses of these instances of Show were easily replaced by usage of `Pretty` which is what should be used when printing things to the user anyway.

Doing a git grep for "instance Show" shows that there are 3 overriden instances left in the repo after this change. 1 is in `Type.Type` and uses unsafePerformIO so I just left it alone. The other 2 are exported in `Elm.Internal.Name` and `Elm.Internal.Version` so I didn't change them because it would break `elm-get`. I do think these should all be changed to uses of `Pretty` though.