Skip to content

Fix #16385 by appending _maybe to a use of lookupGlobalOcc

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

instance forall c. c claimed that c was out of scope because the renamer was invoking lookupGlobalOcc on c (in RnNames.getLocalNonValBinders) without binding c first. To avoid this, this patch changes GHC to invoke lookupGlobalOcc_maybe on c instead, and if that returns Nothing, then bail out, resulting in a better error message.

Merge request reports