
Extremely odd, today ghc 6.4.2 (also on linux) works for me, too: Prelude InfixR> show (A `And` A) "A `And` A" Prelude InfixR> show (And A A) "A `And` A" Prelude InfixR> read (show (And A A)) :: T A `And` A Prelude InfixR> read "And A A" :: T *** Exception: Prelude.read: no parse Prelude InfixR> read "A `And` A" :: T A `And` A (and it can't read "And A A", which is what ghc 6.2.2 could read), yesterday it couldn't read either form. What sort of hiccough could produce such behaviour????????? Bewildered, Daniel Am Samstag, 26. August 2006 21:47 schrieb Ian Lynagh:
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).
Thanks Ian
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." -- Blair P. Houghton