[GHC] #7783: MultiWayIf should start a new layout

GHC cvs-ghc at haskell.org
Thu Mar 21 16:54:32 CET 2013


#7783: MultiWayIf should start a new layout
---------------------------------+------------------------------------------
    Reporter:  exbb2             |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.6.2           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:  #4359             |  
---------------------------------+------------------------------------------

Comment(by simonpj):

 Good point.  I think you expectation is that, with layout braces inserted,
 it'd look like this:
 {{{
 x = if { | False -> if { | False -> 1
                          | False -> 2
                        }
          | True -> 3
        }
 }}}
 No semicolons (there are no semicolons between the guards of a multi-way
 case.  Now it is quite unambiguous, even if it was written all on one
 line.

 This looks reasonable to me, if someone would like to try it.

 Simon

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



More information about the ghc-tickets mailing list