summaryrefslogtreecommitdiff
path: root/compiler/GHC/HsToCore/ListComp.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2021-10-20 17:52:04 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2021-10-20 17:56:23 +0100
commit617f7798009c261045a73a15e8f4f35ddbe9b627 (patch)
tree9fb5b293cf44d54c077bcc8093c37d42241657f8 /compiler/GHC/HsToCore/ListComp.hs
parentd73131b9315abf39fc2d307b1c59bf8edd1e43ac (diff)
downloadhaskell-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