GHC 6.5 error? Illegal polymorphic or qualified type

Einar Karttunen ekarttun at
Sun Apr 16 08:57:27 EDT 2006


Here is a short example of the GHC 6.5 problem:

type AnyE a = forall err. Either err a
foo :: Monad m => AnyE (m t)
foo = undefined

Works with older versions of GHC 6.5, but newer versions
fail with the:

    Illegal polymorphic or qualified type: forall err. Either err (m t)
    In the type signature for `foo':
      foo :: (Monad m) => AnyE (m t)

- Einar Karttunen

More information about the Glasgow-haskell-users mailing list