[commit: ghc] wip/prettyprinter: More cleanups (8507886)

git at git.haskell.org git at git.haskell.org
Wed Sep 13 21:09:21 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/prettyprinter
Link       : http://ghc.haskell.org/trac/ghc/changeset/8507886eeeee403f967981730764368c3fafbd25/ghc

>---------------------------------------------------------------

commit 8507886eeeee403f967981730764368c3fafbd25
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Wed Sep 13 17:02:36 2017 -0400

    More cleanups


>---------------------------------------------------------------

8507886eeeee403f967981730764368c3fafbd25
 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 92acb84..4a533c7 100644
--- a/compiler/utils/Pretty.hs
+++ b/compiler/utils/Pretty.hs
@@ -119,10 +119,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)
@@ -219,6 +218,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