summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-08-03 19:34:36 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-08-05 10:10:33 +0200
commit6f6d082124b24bd8437f95d99a8fd8844a0f6cd8 (patch)
tree88aefc4eecae0d1a8eb85f4b53c8a408318d1b5c /compiler/utils
parent2d1eae26f83bdff3bc5f5eb98101e4fd718afd62 (diff)
downloadhaskell-6f6d082124b24bd8437f95d99a8fd8844a0f6cd8.tar.gz
Pretty: Args of NilAbove/TextBeside/Nest/Union are always RDocs (#10735)
Just following libraries/pretty.
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Pretty.hs13
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler/utils/Pretty.hs b/compiler/utils/Pretty.hs
index 87881ce6fd..12a8a531fb 100644
--- a/compiler/utils/Pretty.hs
+++ b/compiler/utils/Pretty.hs
@@ -583,20 +583,17 @@ mkUnion :: Doc -> Doc -> Doc
mkUnion Empty _ = Empty
mkUnion p q = p `union_` q
--- Arg of a NilAbove is always an RDoc
-nilAbove_ :: Doc -> Doc
+nilAbove_ :: RDoc -> RDoc
nilAbove_ = NilAbove
-- Arg of a TextBeside is always an RDoc
-textBeside_ :: TextDetails -> FastInt -> Doc -> Doc
+textBeside_ :: TextDetails -> FastInt -> RDoc -> RDoc
textBeside_ = TextBeside
--- Arg of Nest is always an RDoc
-nest_ :: FastInt -> Doc -> Doc
+nest_ :: FastInt -> RDoc -> RDoc
nest_ = Nest
--- Args of union are always RDocs
-union_ :: Doc -> Doc -> Doc
+union_ :: RDoc -> RDoc -> RDoc
union_ = Union
@@ -791,7 +788,7 @@ fsep = fill True
-- layout1 $*$ layout2 | hasMoreThanOneLine layout1 = layout1 $$ layout2
-- | otherwise = layout1 $+$ layout2
-fill :: Bool -> [Doc] -> Doc
+fill :: Bool -> [Doc] -> RDoc
fill _ [] = empty
fill g (p:ps) = fill1 g (reduceDoc p) (_ILIT(0)) ps