non-idempotency with comments inside monad/listcomps #31

Open
opened 2017-06-10 13:25:11 +02:00 by lspitzner · 1 comment
lspitzner commented 2017-06-10 13:25:11 +02:00 (Migrated from github.com)
func =
  [ abc x y
  | _ <- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
         -- comment
  , x <- bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  , y <- ccccccccccccccccccccccccccccccccccc
  ]

Each roundtrip through brittany will decrease the indentation of the comment.

Currently I cannot think of an easy fix on brittany's end for this because the ghc-exactprint interface is a bit unfortunate for this usecase. I have raised https://github.com/alanz/ghc-exactprint/issues/53.

~~~~.hs func = [ abc x y | _ <- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -- comment , x <- bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb , y <- ccccccccccccccccccccccccccccccccccc ] ~~~~ Each roundtrip through brittany will decrease the indentation of the comment. Currently I cannot think of an easy fix on brittany's end for this because the `ghc-exactprint` interface is a bit unfortunate for this usecase. I have raised https://github.com/alanz/ghc-exactprint/issues/53.
tfausak commented 2019-06-18 19:41:45 +02:00 (Migrated from github.com)

This seems like the opposite of 😆

This seems like the opposite of #174 😆
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#31
There is no content yet.