Only expand empty binding list with comments
parent
3708838b6a
commit
ad34a8b9b9
|
@ -786,6 +786,9 @@ import Test ( Thing( With
|
||||||
-- !
|
-- !
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
#test prefer-dense-empty-list
|
||||||
|
import VeryLongModuleNameThatCouldEvenCauseAnEmptyBindingListToExpandIntoMultipleLine
|
||||||
|
( )
|
||||||
|
|
||||||
#test preamble full-preamble
|
#test preamble full-preamble
|
||||||
{-# LANGUAGE BangPatterns #-}
|
{-# LANGUAGE BangPatterns #-}
|
||||||
|
|
|
@ -793,6 +793,9 @@ import Test ( Thing( With
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#test prefer-dense-empty-list
|
||||||
|
import VeryLongModuleNameThatCouldEvenCauseAnEmptyBindingListToExpandIntoMultipleLine ()
|
||||||
|
|
||||||
#test preamble full-preamble
|
#test preamble full-preamble
|
||||||
{-# LANGUAGE BangPatterns #-}
|
{-# LANGUAGE BangPatterns #-}
|
||||||
|
|
||||||
|
|
|
@ -118,8 +118,11 @@ layoutLLIEs llies = do
|
||||||
case ieDs of
|
case ieDs of
|
||||||
[] -> docAltFilter
|
[] -> docAltFilter
|
||||||
[ (not hasComments, docLit $ Text.pack "()")
|
[ (not hasComments, docLit $ Text.pack "()")
|
||||||
, (otherwise, docPar (docSeq [docParenLSep, docWrapNode llies docEmpty])
|
, ( hasComments
|
||||||
docParenR)
|
, docPar
|
||||||
|
(docSeq [docParenLSep, docWrapNodeRest llies docEmpty])
|
||||||
|
docParenR
|
||||||
|
)
|
||||||
]
|
]
|
||||||
(ieDsH:ieDsT) ->
|
(ieDsH:ieDsT) ->
|
||||||
docAltFilter
|
docAltFilter
|
||||||
|
|
Loading…
Reference in New Issue