diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2021-10-20 17:52:04 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2021-10-20 17:56:23 +0100 |
commit | 617f7798009c261045a73a15e8f4f35ddbe9b627 (patch) | |
tree | 9fb5b293cf44d54c077bcc8093c37d42241657f8 /compiler/GHC/HsToCore/ListComp.hs | |
parent | d73131b9315abf39fc2d307b1c59bf8edd1e43ac (diff) | |
download | haskell-wip/T20200AgdaDatatypes.tar.gz |
Look up knot-tied GlobalIds in the InScopeSetwip/T20200AgdaDatatypes
As shown in #20200, and described in
Note [Simplifying recursive modules],
it is possible to encounter an occurrence of a GlobalId that
is bound in the module being compiled. Lint complains, quite
properly.
This patch updates GHC.Core.Opt.Simplify.Env.refineFromScope so
that it looks up a GlobalId in the InScopeSet if the module is
the one being compiled. That in turn means we need to know what
is the module being compiled, hence the new st_module field in
SimplTopEnv.
Test case is simplCore/should_compile/AgdaDatatypes
Diffstat (limited to 'compiler/GHC/HsToCore/ListComp.hs')
0 files changed, 0 insertions, 0 deletions