Skip to content

Failure to find class instance specified with extra parentheses

The following two-line program fails to compile under GHC 7.6.3 and compiles fine with GHC 7.4.1:

instance Eq (((->) a) b)
instance (Ord b) => Ord (((->) a) b)

Error message:

    Could not deduce (Eq (a -> b))
      arising from the superclasses of an instance declaration
    from the context (Ord b)

Compilation goes through if I tweak the Eq instance to use "((->) a b)" or "(a -> b)" in place of "(((->) a) b)".

Trac metadata
Trac field Value
Version 7.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information