[GHC] #9914: Inconsistent handling of leading whitespace in GHCi

GHC ghc-devs at haskell.org
Mon Dec 22 06:07:18 UTC 2014


#9914: Inconsistent handling of leading whitespace in GHCi
-------------------------------------+-------------------------------------
              Reporter:  cactus      |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.3
  (Parser)                           |         Keywords:  GHCi
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:  GHC         |  Related Tickets:
  rejects valid program              |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 A simple fix would be to change {{{`isPrefixOf` stmt}}} to {{{`isPrefixOf`
 removeSpaces stmt}}} (or just `dropWhile isSpace`) in two places in
 `InteractiveUI.runStmt`.

 It may be nicer to `removeSpaces` before calling to `runStmt`, but that
 might not work for multiline commands, not sure what kind of layout rules
 those have.

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


More information about the ghc-tickets mailing list