ormolu
ormolu copied to clipboard
Not idempotent with comment in let-block
Describe the bug The following source code will be reformatted twice:
foo :: IO ()
foo = let
foo' = do
putStrLn "hi"
-- test
in foo' >> putStrLn "bye"
To Reproduce
Run ormolu
the first time gets
foo :: IO ()
-foo =
- let foo' = do
- putStrLn "hi"
- -- test
- in foo' >> putStrLn "bye"
+foo = let
+ foo' = do
+ putStrLn "hi"
+ -- test
+ in foo' >> putStrLn "bye"
Run ormolu
again rewrites it again to:
foo :: IO ()
foo =
let foo' = do
putStrLn "hi"
- -- test
- in foo' >> putStrLn "bye"
+ in -- test
+ foo' >> putStrLn "bye"
Any future runs of ormolu
will not make any changes
Expected behavior Should go from the original to the last change directly
Environment
- OS name + version: Mac
- Version of the code:
master
at34bdf62
Additional context Add any other context about the problem here.