Skip to content

Implement the -Wimplicit-rhs-quantification warning (#23510)

Andrei Borzenkov requested to merge wip/sand-witch/DIB-instances into master

Fixed #23510 (closed)

Added new -Wcompat warning -Wimplicit-rhs-quantification

In accordance with GHC Proposal #425, GHC will stop implicitly quantifying over type variables that occur free on the right-hand side of a type synonym but are not mentioned on the left-hand side. Type synonym declarations that rely on this form of quantification should be rewritten with invisible binders.

For example:

type T1    = 'Nothing :: Maybe a      -- old
type T1 @a = 'Nothing :: Maybe a      -- new

This warning detects code that will be affected by this breaking change.

Merge request reports