Type-checker bug

John Hughes rjmh@cs.chalmers.se
Wed, 24 Oct 2001 14:13:06 +0200 (MET DST)


The program below produces this error message (with -98 in the February 2001
version):

ERROR Bug.hs:5 - Instance of Num Int required for definition of f

Pardon?

data T
class C a b | b->a where m :: a -> (Bool, b)
instance C Int T
instance C a b => C [a] [b]
f () = located :: [T]
  where (_,located) = m [0]