Skip to content

Rip out 9-year-old pattern variable hack (#17007)

Ryan Scott requested to merge RyanGlScott/ghc:wip/T17007 into master

GHC had an ad hoc validity check in place to rule out pattern variables bound by type synonyms, such as in the following example:

type ItemColID a b = Int  -- Discards a,b

get :: ItemColID a b -> ItemColID a b
get (x :: ItemColID a b) = x :: ItemColID a b

This hack is wholly unnecessary nowadays, since OutsideIn(X) is more than capable of instantiating a and b to Any. In light of this, let's rip out this validity check.

Fixes #17007 (closed).

Merge request reports