ghc5.04.1 deriving Read/Show broken
George Russell
ger at tzi.de
Mon Sep 16 09:19:33 EDT 2002
Simon Marlow wrote:
[snip]
> It turns out there's a bug in the Read instance for Maybe. It's rather
> unfortunate that there's no workaround other than defining your own
> Maybe type.
>
> The bug was also in 5.04.
[snipped]
No it wasn't. This is what happens with ghc5.04 on Linux
----- cut here ------------------------
# ghci --interactive
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 5.04, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Prelude> :load GHCBug
Compiling GHCBug ( GHCBug.hs, interpreted )
Ok, modules loaded: GHCBug.
*GHCBug> show (read (show (Commit 1 "1" Nothing)) :: Command)
"Commit 1 \"1\" Nothing"
----- cut here -----------------------------
> You should have reported it earlier, George
> :-)
Ah well, if only I had had a pre-release snapshot I could have tried it out on.
Such is life.
More information about the Glasgow-haskell-bugs
mailing list