Closed neongreen closed 3 years ago
The bug is somewhere in https://github.com/tweag/ormolu/pull/499.
Hm, it's fishier than I thought. Input:
{-# OPTIONS_GHC -fplugin=RecordDotPreprocessor #-}
foo = req
{ a = b
}
Output:
{-# OPTIONS_GHC -fplugin=RecordDotPreprocessor #-}
foo =
req{ a = b
}
But now if you remove one of the spaces before req
, you don't get the RDP update anymore. The correct behavior is that there should not an RDP update in either case. Input:
{-# OPTIONS_GHC -fplugin=RecordDotPreprocessor #-}
foo = req
{ a = b
}
Output:
{-# OPTIONS_GHC -fplugin=RecordDotPreprocessor #-}
foo =
req
{ a = b
}
@Avi-D-coder can you take another look at this?
Oops, mis-copied the last example. I edited the comment.
@neongreen Workin on fix here: https://github.com/tweag/ormolu/pull/663
Input:
Output:
The right result should be: