Fix layouting bug for RecordUpd

pull/35/head
Lennart Spitzner 2017-07-04 23:54:02 +02:00
parent 5a82968a7b
commit 6268b8075a
2 changed files with 15 additions and 3 deletions

View File

@ -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
###############################################################################
###############################################################################

View File

@ -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