[GHC] #12091: 'Variable not in scope" when using GHCi with `-fobject-code`

GHC ghc-devs at haskell.org
Thu Jan 17 17:47:05 UTC 2019


#12091: 'Variable not in scope" when using GHCi with `-fobject-code`
-------------------------------------+-------------------------------------
        Reporter:  thomie            |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  high              |            Milestone:  8.4.1
       Component:  GHCi              |              Version:  8.0.1
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #7253, #14108     |  Differential Rev(s):  Phab:D3849
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ömer Sinan Ağacan <omeragacan@…>):

 In [changeset:"a34ee61545930d569d0dbafb3a4a5db3a7a711e5/ghc"
 a34ee615/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="a34ee61545930d569d0dbafb3a4a5db3a7a711e5"
 Refactor GHCi UI to fix #11606, #12091, #15721, #16096

 Instead of parsing and executing a statement or declaration directly we
 now parse them first and then execute in a separate step. This gives us
 the flexibility to inspect the parsed declaration before execution.
 Using this we now inspect parsed declarations, and if it's a single
 declaration of form `x = y` we execute it as `let x = y` instead, fixing
 a ton of problems caused by poor declaration support in GHCi.

 To avoid any users of the modules I left `execStmt` and `runDecls`
 unchanged and added `execStmt'` and `runDecls'` which work on parsed
 statements/declarations.
 }}}

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


More information about the ghc-tickets mailing list