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 #test import-hiding-many
import Prelude as X import Prelude as X
hiding hiding
( head ( head
, init , init
, last , last
, maximum , maximum
, minimum , minimum
, pred , pred
, read , read
, readFile , readFile
, succ , succ
, tail , tail
, undefined , undefined
) )
#test long-module-name-simple #test long-module-name-simple
import TestJustShortEnoughModuleNameLikeThisOne () import TestJustShortEnoughModuleNameLikeThisOne ()

View File

@ -89,7 +89,10 @@ layoutImport limportD@(L _ importD) = docWrapNode limportD $ case importD of
if compact if compact
then docAlt then docAlt
[ docSeq [hidDoc, docForceSingleline $ layoutLLIEs True llies] [ 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 else do
ieDs <- layoutAnnAndSepLLIEs llies ieDs <- layoutAnnAndSepLLIEs llies