Finding definitions made in the current module

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Finding definitions made in the current module

David Luposchainsky
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