[Haskell-cafe] Question on kind inference

Vladimir Reshetnikov v.reshetnikov at gmail.com
Sun May 31 03:17:17 EDT 2009


Hi,

Consider this Haskell code:

-----------------------------------------------
class A a where
  foo :: a b

class B a

class (A a, B a) => C a
-----------------------------------------------

GHC compiles it without errors, but Hugs rejects it: "Illegal type in
class constraint".
What is the correct behavior, and which part of the haskell 98 report
explains this?

Thanks,
Vladimir


More information about the Haskell-Cafe mailing list