Disable single-line HsApp with argument comments. #215

Merged
matt-noonan merged 2 commits from multiline-app-with-comments into master 2019-06-05 21:06:03 +02:00
2 changed files with 12 additions and 1 deletions

View File

@ -650,3 +650,13 @@ jaicyhHumzo btrKpeyiFej mava = do
)
Xcde{} -> (s, Pioemav)
pure imomue
#test issue 214
-- brittany { lconfig_indentPolicy: IndentPolicyMultiple }
foo = bar
arg1 -- this is the first argument
arg2 -- this is the second argument
arg3 -- this is the third argument, now I'll skip one comment
arg4
arg5 -- this is the fifth argument
arg6 -- this is the sixth argument

View File

@ -172,9 +172,10 @@ layoutExpr lexpr@(L _ expr) = do
_ -> docSeq
headDoc <- docSharedWrapper layoutExpr headE
paramDocs <- docSharedWrapper layoutExpr `mapM` paramEs
hasComments <- hasAnyCommentsConnected exp2
runFilteredAlternative $ do
-- foo x y
addAlternative
addAlternativeCond (not hasComments)
$ colsOrSequence
$ appSep (docForceSingleline headDoc)
: spacifyDocs (docForceSingleline <$> paramDocs)