Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-idempotence with bracketed do commands #753

Closed
amesgen opened this issue Aug 9, 2021 · 0 comments · Fixed by #755
Closed

Non-idempotence with bracketed do commands #753

amesgen opened this issue Aug 9, 2021 · 0 comments · Fixed by #755
Labels
bug Something isn't working idempotence Idempotence issues and solutions.

Comments

@amesgen
Copy link
Member

amesgen commented Aug 9, 2021

Describe the bug

This snippet is not idempotent (minimized from here):

{-# LANGUAGE Arrows #-}

foo = proc x -> (do b -< x)

to

{-# LANGUAGE Arrows #-}

foo = proc x -> (do
                  b -< x)

to

{-# LANGUAGE Arrows #-}

foo = proc x ->
  ( do
      b -< x
  )

Expected behavior
The first snippet should be a fixed point.

Environment
Ormolu 0.2.0.0

Additional context
This should be fixed when we preserve single vs multiline formatting of do commands.

@amesgen amesgen added bug Something isn't working idempotence Idempotence issues and solutions. labels Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working idempotence Idempotence issues and solutions.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant