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

GHC ghc-devs at haskell.org
Sun Dec 21 04:33:13 UTC 2014


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

 {{{
 λ» let x = 1
 λ» x
 1
 λ»  let x = 2 -- Note leading whitespace
 λ» x
 2
 λ» data Foo = Foo
 λ» :i Foo
 data Foo = Foo  -- Defined at <interactive>:6:1
 }}}

 However, this fails:

 {{{
 λ»  data Bar = Bar -- Note leading whitespace

 <interactive>:8:2: parse error on input ‘data’
 }}}

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


More information about the ghc-tickets mailing list