Show Bug (I think)
Neil Mitchell
ndmitchell at gmail.com
Sun Apr 30 14:09:47 EDT 2006
Hi,
-------
data Item = Item1 Item
| Item2 {a :: Int}
deriving (Show, Read)
value = Item1 (Item2 1)
valueHugs = "Item1 Item2 {a = 1}"
valueGhc = "Item1 (Item2 {a = 1})"
readItem x = (read x) :: Item
------
With the following code show value under Hugs and Ghc give different
results. readItem valueHugs and valueGhc both succeed under Hugs, but
readItem valueHugs fails under GHC.
I guess this is a bug with GHC, since that text for valueHugs on the
command line succeeds with GHCi - i.e. typed directly not with read.
Hugs: WinHugs CVS
GHC: 6.4.2 Windows
Thanks
Neil
More information about the Glasgow-haskell-bugs
mailing list