[GHC] #16096: let x = ... and x = ... are not the same in GHCi

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


#16096: let x = ... and x = ... are not the same in GHCi
-------------------------------------+-------------------------------------
        Reporter:  osa1              |                Owner:  osa1
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.8.1
       Component:  GHCi              |              Version:  8.6.3
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
                                     |  ghci/should_run/T16096
      Blocked By:                    |             Blocking:
 Related Tickets:  #11606            |  Differential Rev(s):
       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/16096#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list