Closed pkapustin closed 4 years ago
@Avi-D-coder can you take a look at this?
@pkapustin thanks for pointing this out. Test case for this.
data FooBar = FooBar {foo :: Int, bar :: Int} deriving (Show)
newtype Foo = Foo {foo :: Int} deriving (Show)
fooplus f n = f {foo = f.foo + n} -- Error: Record update is ambiguous
The record update syntax in record-dot-preprocessor relies on the fact that in
expr{lbl = val}
the{
cannot have whitespace before it, but ormolu inserts an extra space. I think that the spacing around{
in record updates should not be changed in the files that use record-dot-preprocessor.