failure to check completeness in instance declarations

Andrew Tolmach apt@cs.pdx.edu
Fri, 21 Mar 2003 10:37:59 -0800


The following file is accepted by hugs (Nov.02 version on linux) without
complaint.
Attempting to evaluate z causes a Segmentation fault (not unreasonably,
perhaps!).
As far as I can tell, completeness is never being checked statically. 
Sometimes
it is successfully checked dynamically and causes an "Undefined member"
error.

-----------

data Foo a = Foo a

instance Eq (Foo a) where

z = Foo 1 == Foo 2

---------------