Finding definitions made in the current module

David Luposchainsky dluposchainsky at googlemail.com
Mon Aug 26 17:06:02 CEST 2013


Hey everyone,

I'm having trouble finding a good middle ground between the global and
local environments in the typechecker. I would like to get an
environment of things that are defined in the current module, but

- TcGblEnv includes everything in scope, which is too general.
- TcLclEnv is (if I'm right) meant to handle scoping, which is too
  narrow.

The reason for this is that the AMP warnings should be restricted to a
single module. In the current implementation, having a module import an
AMP-violating module issues a warning from each module using the
offender (including that module itself). It does the job, but it's not
pretty.

David




More information about the ghc-devs mailing list