From 0401f314da30c4566807c53c214757747abbf529 Mon Sep 17 00:00:00 2001 From: Evan Rutledge Borden Date: Sat, 30 Dec 2017 23:07:58 -0500 Subject: [PATCH] Remove docAlt. --- .../Brittany/Internal/Layouters/DataDecl.hs | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/Language/Haskell/Brittany/Internal/Layouters/DataDecl.hs b/src/Language/Haskell/Brittany/Internal/Layouters/DataDecl.hs index 891b841..ed6aaeb 100644 --- a/src/Language/Haskell/Brittany/Internal/Layouters/DataDecl.hs +++ b/src/Language/Haskell/Brittany/Internal/Layouters/DataDecl.hs @@ -145,20 +145,16 @@ createDerivingPar mDerivs mainDoc = do case mDerivs of Nothing -> docLines [mainDoc] Just (L _ [(HsIB _ t)]) -> do - docAlt - [ docPar mainDoc $ docEnsureIndent BrIndentRegular $ docSeq - [docDeriving, docSeparator, layoutType t] - ] + docPar mainDoc $ docEnsureIndent BrIndentRegular $ docSeq + [docDeriving, docSeparator, layoutType t] Just (L _ ts ) -> do - docAlt - [ docPar mainDoc $ docEnsureIndent BrIndentRegular $ docSeq - [ docDeriving - , docSeparator - , docLit $ Text.pack "(" - , docSeq $ List.intersperse docCommaSep $ ts <&> \(HsIB _ t) -> - layoutType t - , docLit $ Text.pack ")" - ] + docPar mainDoc $ docEnsureIndent BrIndentRegular $ docSeq + [ docDeriving + , docSeparator + , docLit $ Text.pack "(" + , docSeq $ List.intersperse docCommaSep $ ts <&> \(HsIB _ t) -> + layoutType t + , docLit $ Text.pack ")" ] docDeriving :: ToBriDocM BriDocNumbered