
#12641: Indentation works differently for multi-way if than for guards when using comma-separate view patterns -------------------------------------+------------------------------------- Reporter: ahmadsalim | Owner: Type: bug | Status: closed Priority: lowest | Milestone: Component: Compiler | Version: 8.0.1 (Parser) | Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => closed * resolution: => invalid Comment: This is by design. Note that the [https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts... #multi-way-if-expressions manual] says that a multi-way `if` introduces a layout context. This is unlike normal pattern guards, which do not need layout for disambiguation of nesting. Personally, I've never liked this design choice, but I don't have a better one to suggest (then or now). There is some recent discussion [https://github.com/haskell/rfcs/pull/4 here]. In any case, there's no misbehavior here, so I am closing. Thanks very much for reporting, however! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12641#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler