Skip to content

Warn when an equality constraint comes into scope without -XMonoLocalBinds

As imagined in #20485 (comment 393506), we might have an equality given come into scope even without a pattern match:

{-# LANGUAGE TypeFamilies, RankNTypes #-}
module A where
higher :: forall a. (forall b. (a ~ F b) => ...) -> ...
import A
x = higher (\ ... -> ...)

The lambda argument to higher has an equality given in scope without MonoLocalBinds. This should produce the warning introduced by !7042 (closed).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information