You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The following input code
readPackets s requests notifications = forever do
packet@AMSPacket{payload, commandId} <- readPacket s
atomically docase commandId of8->caseDecode.parseOnly parseDeviceNotification payload ofLeft e ->
throwSTM $CouldNotParseResponse e
Right deviceNotification ->
writeTChan notifications deviceNotification
_ ->do
maybePacket <-
stateTVar requests $IntMap.updateLookupWithKey (\_ _ ->Nothing) (fromIntegral (invokeId packet))
case maybePacket ofNothing-> throwSTM $UnexpectedMessage packet
Just consume -> consume packet
Gets squashed into
readPackets s requests notifications = forever do
packet@AMSPacket {payload, commandId} <- readPacket s
atomically docase commandId of8->caseDecode.parseOnly parseDeviceNotification payload ofLeft e ->
throwSTM $CouldNotParseResponse e
Right deviceNotification ->
writeTChan notifications deviceNotification
_ ->do
maybePacket <-
stateTVar requests $IntMap.updateLookupWithKey (\_ _ ->Nothing) (fromIntegral (invokeId packet))
case maybePacket ofNothing-> throwSTM $UnexpectedMessage packet
Just consume -> consume packet
I struggle to follow the flow like this, and would like Ormolu to preserve the blank lines.
Describe the solution you'd like
Ormolu preserves blank lines between case branches.
Describe alternatives you've considered
I could rewrite my code so each branch is a where clause. If I did this, I probably wouldn't need the branches to be separated by blank lines, and blank lines are preserved in where clauses.
The text was updated successfully, but these errors were encountered:
amesgen
added
the
style
Nitpicking and things related to purely visual aspect for formatting.
label
Jun 25, 2022
I think this is another variant of #635 and #802. Again, I suggest that Ormolu just preserve groupings in all cases: don't insert blank lines where there were none, and don't remove blank lines where they existed.
Is your feature request related to a problem? Please describe.
The following input code
Gets squashed into
I struggle to follow the flow like this, and would like Ormolu to preserve the blank lines.
Describe the solution you'd like
Ormolu preserves blank lines between case branches.
Describe alternatives you've considered
I could rewrite my code so each branch is a
where
clause. If I did this, I probably wouldn't need the branches to be separated by blank lines, and blank lines are preserved inwhere
clauses.The text was updated successfully, but these errors were encountered: