Lennart Augustsson wrote:
> 
> But most importantly, this was a bad example.  There was a much better
> one posted on this mailing list a while ago.  Does anyone remember it?

No, but this should do it:

data T = T Int

instance Show T where
        show (T n) = show n

instance Eq

instance Num T where
        fromInteger n = T n
        (+) (T _) (T _) = T 0

x :: T  -- try removing this type signature
x = 1 + 2

main = putStr (show x)


        - Andreas

-- 
Andreas Rossberg, [EMAIL PROTECTED]

"Computer games don't affect kids.
 If Pac Man affected us as kids, we would all be running around in
 darkened rooms, munching pills, and listening to repetitive music."

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to