Skip to content

Better error for out-of-scope RebindableSyntax

If a RebindableSyntax identifier is missing, GHC reports "out of scope". I think the error could mention the provenance "required by RebindableSyntax", to distinguish it from user-written out-of-scope identifiers.

{-# LANGUAGE RebindableSyntax #-}
x = 1
T.hs:2:5: error: Not in scope: ‘fromInteger’
  |
2 | x = 1
  |     ^

Same for the error "Ambiguous occurrence".

Edited by Krzysztof Gogolewski
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information