Skip to content
  • Ryan Scott's avatar
    Fix #16385 by appending _maybe to a use of lookupGlobalOcc · 78dd04f9
    Ryan Scott authored and Marge Bot's avatar Marge Bot committed
    `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.
    78dd04f9