Note [Quick Look for particular Ids]
We switch on Quick Look (regardless of -XImpredicativeTypes) for certain particular Ids: * ($): For a long time GHC has had a special typing rule for ($), that allows it to type (runST $ foo), which requires impredicative instantiation of ($), without language flags. It's a bit ad-hoc, but it's been that way for ages. Using quickLookKeys is the only special treatment ($) needs now, which is a lot better. * leftSection, rightSection: these are introduced by the expansion step in the renamer (Note [Handling overloaded and rebindable constructs] in GHC.Rename.Expr), and we want them to be instantiated impredicatively so that (f `op`), say, will work OK even if `f` is higher rank. See Note [Left and right sections] in GHC.Rename.Expr.
References 2
- Handling overloaded and rebindable constructs GHC.Rename.Expr
- Left and right sections GHC.Rename.Expr
Referenced by 1
- GHC.Tc.Gen.App call site