#4136: Automatically derived Read of operator is not inverse of automatically
derived Show
---------------------------------+------------------------------------------
Reporter: dsf | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.13 | Keywords:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: Runtime crash
---------------------------------+------------------------------------------
This program fails as shown below using ghc 6.13 snapshot 20100519
{{{
data T = (:=:) | (:!=:) deriving (Show,Read)
main =
putStrLn ("show (:=:) = " ++ show (:=:)) >>
putStrLn ("read (show (:=:)) :: T = " ++
show (read (show (:=:)) :: T))
}}}
Result:
{{{
> main
show (:=:) = :=:
read (show (:=:)) :: T = *** Exception: Prelude.read: no parse
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4136>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs