Anomalous Class Fundep Inference
Ashley Yakeley
ashley@semantic.org
Fri, 4 May 2001 23:52:40 -0700
At 2001-05-03 01:42, Simon Peyton-Jones wrote:
>Quite right too!
OK, I understand it a bit better now. This code does not compile:
--
class X a
instance X Bool
instance (Num a) => X a
--
Can someone explain why the two instances overlap, given that Bool is not
an instance of Num?
Would it be possible for Haskell to figure out this sort of thing and not
complain about it, or would that lead to nasty problems?
--
Ashley Yakeley, Seattle WA