ghc5.04.1 deriving Read/Show broken

Simon Marlow simonmar at microsoft.com
Mon Sep 16 08:31:14 EDT 2002


> With the attached file, on both Linux and Solaris, I get the following
> 
> ----  Cut here -------
> # ghci --interactive
>    ___         ___ _
>   / _ \ /\  /\/ __(_)
>  / /_\// /_/ / /  | |      GHC Interactive, version 5.04.1, 
> 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)
> "*** Exception: Prelude.read: no parse
> ----- Cut here ------------
> 
> NB (1) this seems to occur in ghc generally, not just in 
> ghci.  (2) Read/Show being fairly
> important to us, I'm afraid this means we will have to avoid 
> using ghc5.04.1.  I hope ghc5.04.2 comes along soon.

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.  You should have reported it earlier, George
:-)  I think we can consider it not critical enough to roll 5.04.2
immediately (a release is a fairly major undertaking) but this will
certainly hurry along the release cycle a bit.  Anyway thanks for the
report.

Cheers,
	Simon



More information about the Glasgow-haskell-bugs mailing list