21 Mar
2003
21 Mar
'03
7:22 p.m.
On Fri, Mar 21, 2003 at 10:37:59AM -0800, Andrew Tolmach wrote:
The following file is accepted by hugs (Nov.02 version on linux) without complaint.
data Foo a = Foo a
instance Eq (Foo a) where
z = Foo 1 == Foo 2
Incomplete instances are legal in Haskell 98, but this one isn't, because (==) has a default definition: class Eq a where (==), (/=) :: a -> a -> Bool x /= y = not (x == y) x == y = not (x /= y)
Attempting to evaluate z causes a Segmentation fault (not unreasonably, perhaps!).
Segmentation fault is the Hugs implementation of stack overflow :-(