newtype A = A [A] deriving Eq -- context stack overflow
Wolfgang Thaller
wolfgang.thaller at gmx.net
Thu Jun 20 15:34:48 EDT 2002
The following causes a Context reduction stack overflow:
module ContextBug where
newtype A = A [A] deriving (Eq)
test :: A -> A -> Bool
test x y = x == y
Changing from newtype to data helps.
I haven't yet cvs-updated the newest revision to the typechecker, but
that was just about undecidable instances, I think, so it shouldn't have
affected this.
Thanks to Kristofer Johannisson <krijo at cs.chalmers.se> for first running
into this problem.
Cheers,
Wolfgang
More information about the Glasgow-haskell-bugs
mailing list