deriving weirdness on newtypes

Simon Peyton-Jones
Tue, 8 Oct 2002 13:48:43 +0100

|     newtype Foo =3D Foo Int deriving (Num)
|     instance Show Foo where { show =3D undefined }
| then, the value of 'show (Foo 5)' is undefined, but the value of 'show
| (5::Foo)' is "5".  definately *WRONG*.

You're right.   This is all a bit more complicated than I (or John H)
thought.  Thinking cap on.  But don't hold your breath.