When should we allow self-qualification in lookupLocalRdrEnv
Currently, lookupLocalRdrEnv
does not allow any qualification, not even when the qualification is the current module.
I believe this means that the following is accepted:
module M () where
x = 3
y = M.x
but the following is rejected:
module M () where
y = M.x
where x = 3
This seems sort of reasonable, but I'm not sure if this behaviour is fully specified somewhere. If it is (e.g. in the Haskell report), then we should add a comment to lookupLocalRdrEnv
to say so.
Edited by Rodrigo Mesquita