#2529: deriving Read fails on infix data constructors with record syntax
-----------------------+----------------------------------------------------
    Reporter:  spl     |       Owner:          
        Type:  bug     |      Status:  new     
    Priority:  normal  |   Component:  Compiler
     Version:  6.8.3   |    Severity:  normal  
    Keywords:          |    Testcase:          
Architecture:  x86     |          Os:  MacOS X 
-----------------------+----------------------------------------------------
 The example below successfully performs the {{{show}}}, but {{{reads}}}
 returns an empty list. It fails in both GHCi and GHC. It succeeds if you
 replaces the infix symbol with a name.

 {{{
 module Main where

 data A = (:<>:) { x :: Int, y :: Int } deriving (Read, Show)

 t :: A
 t = 1 :<>: 2

 s :: String
 s = show t

 r :: [(A,String)]
 r = reads s

 main :: IO ()
 main = do putStrLn s
           putStrLn (show r)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2529>
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

Reply via email to