Hi,

what options do you have :set when seeing this behaviour?
(i.e., I'm having trouble reproducing it here.)

--sigbjorn

----- Original Message -----
From: "Shawn P. Garbett" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Dean Herington" <[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 06:39
Subject: Bug in show instance


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> The following code generates some unexpected behavior (at least to me) in
> hugs (Feburary 2001: hugs 98 compatibility)
>
> - -----------------------------------
> main = print(show test)
>
> newtype Out a = MkOut (String, a)
>
> instance (Show a) => Show (Out a) where
>   show (MkOut (x,y)) = x ++ " value: " ++ show y
>
> test = MkOut("Blah\nBlah", 4)
> - --------------------------------------
>
> Hugs Output:
>
> Main> test
> ("Blah\nBlah",4)
> (20 reductions, 55 cells)
> Main>
>
> - ------------------------------
>
> GHCi (and expected output):
>
> Main> test
> Blah
> Blah value: 4
> Main>
>


_______________________________________________
Hugs-Bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/hugs-bugs

Reply via email to