From de5f0401f3ffaab397370cd60227d7086fc7a703 Mon Sep 17 00:00:00 2001 From: Evan Rutledge Borden Date: Sun, 19 Nov 2017 15:08:11 -0500 Subject: [PATCH] Add consistency between contsrained and unconstrained forall format Constrained forall formats aligned the `.` to the left. Constrained formats aligned the `.` to the right. This change adds consistency between both formats. --- .../Haskell/Brittany/Internal/Layouters/Type.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Language/Haskell/Brittany/Internal/Layouters/Type.hs b/src/Language/Haskell/Brittany/Internal/Layouters/Type.hs index a5148f5..bd4d728 100644 --- a/src/Language/Haskell/Brittany/Internal/Layouters/Type.hs +++ b/src/Language/Haskell/Brittany/Internal/Layouters/Type.hs @@ -174,17 +174,17 @@ layoutType ltype@(L _ typ) = docWrapNode ltype $ case typ of , docForceSingleline $ return $ typeDoc ] -- :: forall x - -- . x + -- . x , docPar (docSeq $ docLit (Text.pack "forall") : tyVarDocLineList) ( docCols ColTyOpPrefix - [ docWrapNodeRest ltype $ docLit $ Text.pack ". " + [ docWrapNodeRest ltype $ docLit $ Text.pack " . " , maybeForceML $ return typeDoc ] ) -- :: forall -- (x :: *) - -- . x + -- . x , docPar (docLit (Text.pack "forall")) (docLines @@ -204,7 +204,7 @@ layoutType ltype@(L _ typ) = docWrapNode ltype $ case typ of ] ) ++[ docCols ColTyOpPrefix - [ docWrapNodeRest ltype $ docLit $ Text.pack ". " + [ docWrapNodeRest ltype $ docLit $ Text.pack " . " , maybeForceML $ return typeDoc ] ] @@ -499,7 +499,7 @@ layoutType ltype@(L _ typ) = docWrapNode ltype $ case typ of ) (docCols ColTyOpPrefix [ docWrapNodeRest ltype - $ docLit $ Text.pack "::" + $ docLit $ Text.pack ":: " , docAddBaseY (BrIndentSpecial 2) typeDoc1 ]) ]