mirror of
https://github.com/google/ormolu.git
synced 2024-10-05 12:17:09 +03:00
Fix a weird formatting on RecordDotSyntax support. (#3)
This commit is contained in:
parent
24fd712462
commit
d186cdf5ba
@ -1,10 +1,12 @@
|
||||
{-# OPTIONS_GHC -fplugin=RecordDotPreprocessor #-}
|
||||
|
||||
bar' =
|
||||
(Foo 1){bar = 2
|
||||
}
|
||||
(Foo 1)
|
||||
{ bar = 2
|
||||
}
|
||||
|
||||
fooplus'''' f n =
|
||||
f{foo = n
|
||||
f
|
||||
{ foo = n
|
||||
, bar = n
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ mfoo = fmap (.bar) $ Nothing
|
||||
|
||||
bar = (Foo 1).bar
|
||||
|
||||
fooplus f n = f{foo = f.bar + n}
|
||||
fooplus f n = f {foo = f.bar + n}
|
||||
|
||||
fooplus' f n = f {foo = f.bar + n}
|
||||
|
||||
|
@ -228,7 +228,9 @@ braces = brackets_ False "{" "}"
|
||||
--
|
||||
-- @since 0.1.3.1
|
||||
recordDotBraces :: R () -> R ()
|
||||
recordDotBraces m = sitcc (vlayout singleLine multiLine)
|
||||
recordDotBraces m = do
|
||||
breakpoint
|
||||
inci $ vlayout singleLine multiLine
|
||||
where
|
||||
singleLine = do
|
||||
txt "{"
|
||||
@ -236,7 +238,8 @@ recordDotBraces m = sitcc (vlayout singleLine multiLine)
|
||||
txt "}"
|
||||
multiLine = do
|
||||
txt "{"
|
||||
sitcc m
|
||||
space
|
||||
m
|
||||
newline
|
||||
txt "}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user