Commit 78dd04f9 authored by Committed by Marge Bot
Fix #16385 by appending _maybe to a use of lookupGlobalOcc
`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.
Showing with 38 additions and 8 deletions