Fix layouting bug for RecordUpd
parent
5a82968a7b
commit
6268b8075a
|
@ -920,6 +920,19 @@ parserPrim =
|
|||
samples = (SV.unpackaaaaadat) <&> \f ->
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
|
||||
#test recordupd-singleline-bug
|
||||
|
||||
runBrittany tabSize text = do
|
||||
let
|
||||
config' = staticDefaultConfig
|
||||
config = config'
|
||||
{ _conf_layout = (_conf_layout config') { _lconfig_indentAmount = coerce
|
||||
tabSize
|
||||
}
|
||||
, _conf_forward = forwardOptionsSyntaxExtsEnabled
|
||||
}
|
||||
parsePrintModule config text
|
||||
|
||||
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
|
|
|
@ -706,9 +706,8 @@ layoutExpr lexpr@(L _ expr) = docWrapNode lexpr $ case expr of
|
|||
Ambiguous n _ -> (lfield, lrdrNameToText n, rFExpDoc)
|
||||
docAlt
|
||||
-- singleline
|
||||
[ docSetParSpacing
|
||||
$ docSeq
|
||||
[ docNodeAnnKW lexpr Nothing $ appSep rExprDoc
|
||||
[ docSeq
|
||||
[ docNodeAnnKW lexpr Nothing $ appSep $ docForceSingleline rExprDoc
|
||||
, appSep $ docLit $ Text.pack "{"
|
||||
, appSep $ docSeq $ List.intersperse docCommaSep
|
||||
$ rFs <&> \case
|
||||
|
|
Loading…
Reference in New Issue