[GHC] #7783: MultiWayIf should start a new layout
GHC
ghc-devs
Tue Oct 1 10:48:43 UTC 2013
#7783: MultiWayIf should start a new layout
--------------------------------------+------------------------------------
Reporter: exbb2 | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler (Parser) | Version: 7.6.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets: #4359
--------------------------------------+------------------------------------
Comment (by Simon Marlow <marlowsd@?>):
In [changeset:aab65608f9a26990b2c5083e4b65b9d1f6c9b48a/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="aab65608f9a26990b2c5083e4b65b9d1f6c9b48a"
Add layout to MultiWayIf (#7783)
This makes it possible to write
x = if | False -> if | False -> 1
| False -> 2
| True -> 3
Layout normally inserts semicolons between declarations at the same
indentation level, so I added optional semicolons to the syntax for
guards in MultiWayIf syntax. This is a bit of a hack, but the
alternative (a special kind of layout that doesn't insert semicolons)
seemed worse, or at least equally bad.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7783#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list