Skip to content

Don't permit type variables in the context unless they are in the type

GHC accepts the following:

f :: Eq a => b -> b
f b = b

This is not valid Haskell 2010[0], so we should not permit it.

[0] «The context cx must only contain type variables referenced in t», https://www.haskell.org/report/node/2010/haskellch4.html#x10-660004.1.3

Trac metadata
Trac field Value
Version
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
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