Add indentation to import-hiding-paragraph

pull/153/head
Lennart Spitzner 2018-06-04 18:18:44 +02:00
parent 5816704658
commit cc0718e964
2 changed files with 16 additions and 13 deletions

View File

@ -739,18 +739,18 @@ import Test as T hiding ()
#test import-hiding-many
import Prelude as X
hiding
( head
, init
, last
, maximum
, minimum
, pred
, read
, readFile
, succ
, tail
, undefined
)
( head
, init
, last
, maximum
, minimum
, pred
, read
, readFile
, succ
, tail
, undefined
)
#test long-module-name-simple
import TestJustShortEnoughModuleNameLikeThisOne ()

View File

@ -89,7 +89,10 @@ layoutImport limportD@(L _ importD) = docWrapNode limportD $ case importD of
if compact
then docAlt
[ docSeq [hidDoc, docForceSingleline $ layoutLLIEs True llies]
, docPar hidDoc (layoutLLIEs True llies)
, let makeParIfHiding = if hiding
then docAddBaseY BrIndentRegular . docPar hidDoc
else id
in makeParIfHiding (layoutLLIEs True llies)
]
else do
ieDs <- layoutAnnAndSepLLIEs llies