[Haskell-cafe] Re: Derived Read instance for types with infix constructors (ghc 6.4.1)

Ian Lynagh igloo at earth.li
Sat Aug 26 15:47:44 EDT 2006

On Sat, Aug 26, 2006 at 10:15:17PM +0300, Misha Aizatulin wrote:
> Neil Mitchell wrote:
> >> *Main> show $ A `And` A
> >> "A And A"
> > 
> > For me, using GHCi 6.4.2 + Windows, I get:
> > "A `And` A"
>   I installed GHC 6.4.2 now (on Linux). It really does print "A `And`
> A", but still doesn't read it. Would you agree that GHC doesn't conform
> to the Haskell Report here? In fact it seems to produce a Read instance
> with no valid input for it!

ghci on 6.4.2 Linux works for me:

*Main> show (A `And` A) 
"A `And` A"
*Main> read (show (A `And` A)) :: T
A `And` A

(recent 6.5 also seems fine).


More information about the Haskell-Cafe mailing list