[commit: ghc] wip/prettyprinter: More cleanups (9b39652)
git at git.haskell.org
git at git.haskell.org
Thu Jan 18 18:08:46 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/prettyprinter
Link : http://ghc.haskell.org/trac/ghc/changeset/9b3965237c22cb65a8f3d023ab9e1f22a86224b8/ghc
>---------------------------------------------------------------
commit 9b3965237c22cb65a8f3d023ab9e1f22a86224b8
Author: Ben Gamari <ben at smart-cactus.org>
Date: Wed Sep 13 17:02:36 2017 -0400
More cleanups
>---------------------------------------------------------------
9b3965237c22cb65a8f3d023ab9e1f22a86224b8
compiler/utils/Pretty.hs | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/compiler/utils/Pretty.hs b/compiler/utils/Pretty.hs
index d876972..a085e11 100644
--- a/compiler/utils/Pretty.hs
+++ b/compiler/utils/Pretty.hs
@@ -121,10 +121,9 @@ import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.IO as TL
-import Data.Text.Prettyprint.Doc
--- PI = PrettyprinterInternal
-import Data.Text.Prettyprint.Doc.Internal as PI
-
+import Data.Text.Prettyprint.Doc hiding (vcat)
+import qualified Data.Text.Prettyprint.Doc as P
+import qualified Data.Text.Prettyprint.Doc.Internal as PI
import Data.Text.Prettyprint.Doc.Render.Text
import GHC.Float (float2Double)
@@ -221,6 +220,8 @@ infixl 5 $$, $+$
($$) :: Doc a -> Doc a -> Doc a
($$) = ($+$)
+vcat :: [Doc a] -> Doc a
+vcat = foldr ($$) mempty
-- ---------------------------------------------------------------------------
-- The Doc data type
More information about the ghc-commits
mailing list