[GHC] #9042: List indenting in case fails

GHC ghc-devs at haskell.org
Sun Apr 27 17:41:04 UTC 2014


#9042: List indenting in case fails
------------------------------------+-------------------------------------
       Reporter:  laar              |             Owner:
           Type:  bug               |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Compiler          |           Version:  7.8.2
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 The following code fails to parse

 {{{
 module Temp where


 t = case [1..2] of
         [ 1
         , 2
         ] -> True
         _ -> False
 }}}
 with
 {{{
 Temp.hs:5:9:
     parse error (possibly incorrect indentation or mismatched brackets)
 }}}
 Which relates to the line `, 2`. Indenting both that line and the next one
 is needed to parse the module. This is contrary to what I suspected. As
 this vertical layout for lists is allowed as expression, I would also
 expect it to work for patterns.

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


More information about the ghc-tickets mailing list