Comments before guards of -XMultiWayIf #147

Open
opened 2018-05-24 17:37:55 +02:00 by lspitzner · 2 comments
lspitzner commented 2018-05-24 17:37:55 +02:00 (Migrated from github.com)

Somewhat similar to #112, these don't work at all atm.

Somewhat similar to #112, these don't work at all atm.
lspitzner commented 2018-05-24 17:46:39 +02:00 (Migrated from github.com)

Neither do comments after the ->s work with this extension

Neither do comments after the `->`s work with this extension
tfausak commented 2019-06-18 15:13:06 +02:00 (Migrated from github.com)

Input:

{-# language MultiWayIf #-}
-- a
f =
 -- b
 if
  -- c
  | False ->
   -- d
    0
  -- e
  | True ->
   -- f
   1

Output:

{-# language MultiWayIf #-}
-- a
f =
 -- b
    if
  |
  -- c
    False ->
 -- d
             0
  |
-- e
    True  ->
 -- f
             1

Running the output back through Brittany again changes things again:

{-# language MultiWayIf #-}
-- a
f =
 -- b
    if
  |
-- c
    False ->
-- d
             0
  |
-- e
    True  ->
-- f
             1
Input: ``` hs {-# language MultiWayIf #-} -- a f = -- b if -- c | False -> -- d 0 -- e | True -> -- f 1 ``` Output: ``` hs {-# language MultiWayIf #-} -- a f = -- b if | -- c False -> -- d 0 | -- e True -> -- f 1 ``` Running the output back through Brittany again changes things again: ``` hs {-# language MultiWayIf #-} -- a f = -- b if | -- c False -> -- d 0 | -- e True -> -- f 1 ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hexagoxel/brittany#147
There is no content yet.