[GHC] #14391: Make the simplifier independent of the typechecker

GHC ghc-devs at haskell.org
Thu Mar 22 17:31:44 UTC 2018


#14391: Make the simplifier independent of the typechecker
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:  ulysses4ever
            Type:  task              |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.3
      Resolution:                    |             Keywords:  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4503
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Well,

 * `initTcForLookup` initialises the `tcg_rdr_env` to `emptyGlobalRdrEnv`,
 and `tcl_rdr` to `emptyLocalRdrEnv`.

 * So in `lookupThName_maybe`, the `lookupLocalRdrEnv` is guaranteed to
 faile; and in `lookupGlobalOccRn_maybe` only the `lookupExactOrOrig` stuff
 can succeed.

 * For `lookupOrig` we are simply looking in the `OrigNameCache`, which is
 available in `CoreM`.

 * I think `lookupExact` is even easier, because I think the name must be
 an External name.

 Maybe that can help you get further

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14391#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list