Merge pull request #215 from matt-noonan/multiline-app-with-comments
Disable single-line HsApp with argument comments.pull/222/head^2
commit
4f2673a2eb
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue