logo       

Show Bug (I think): msg#00077

lang.haskell.glasgow.bugs

Subject: Show Bug (I think)

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise