summaryrefslogtreecommitdiff
path: root/compiler/utils/Pretty.hs
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-08-03 19:23:21 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-08-05 10:10:33 +0200
commit2d1eae26f83bdff3bc5f5eb98101e4fd718afd62 (patch)
tree1d80f033c755f352bec6c323c18d074923ff199a /compiler/utils/Pretty.hs
parent53484d3deff9fa9f8b3da01a4b375b4ea8a7ba05 (diff)
downloadhaskell-2d1eae26f83bdff3bc5f5eb98101e4fd718afd62.tar.gz
Pretty: kill code that has been dead since 1997 (#10735)
Diffstat (limited to 'compiler/utils/Pretty.hs')
-rw-r--r--compiler/utils/Pretty.hs25
1 files changed, 4 insertions, 21 deletions
diff --git a/compiler/utils/Pretty.hs b/compiler/utils/Pretty.hs
index 62a1a1c698..87881ce6fd 100644
--- a/compiler/utils/Pretty.hs
+++ b/compiler/utils/Pretty.hs
@@ -296,9 +296,6 @@ infixl 6 <>
infixl 6 <+>
infixl 5 $$, $+$
--- Disable ASSERT checks; they are expensive!
-#define LOCAL_ASSERT(x)
-
-- ---------------------------------------------------------------------------
-- The Doc data type
@@ -588,33 +585,19 @@ mkUnion p q = p `union_` q
-- Arg of a NilAbove is always an RDoc
nilAbove_ :: Doc -> Doc
-nilAbove_ p = LOCAL_ASSERT( _ok p ) NilAbove p
- where
- _ok Empty = False
- _ok _ = True
+nilAbove_ = NilAbove
-- Arg of a TextBeside is always an RDoc
textBeside_ :: TextDetails -> FastInt -> Doc -> Doc
-textBeside_ s sl p = TextBeside s sl (LOCAL_ASSERT( _ok p ) p)
- where
- _ok (Nest _ _) = False
- _ok _ = True
+textBeside_ = TextBeside
-- Arg of Nest is always an RDoc
nest_ :: FastInt -> Doc -> Doc
-nest_ k p = Nest k (LOCAL_ASSERT( _ok p ) p)
- where
- _ok Empty = False
- _ok _ = True
+nest_ = Nest
-- Args of union are always RDocs
union_ :: Doc -> Doc -> Doc
-union_ p q = Union (LOCAL_ASSERT( _ok p ) p) (LOCAL_ASSERT( _ok q ) q)
- where
- _ok (TextBeside _ _ _) = True
- _ok (NilAbove _) = True
- _ok (Union _ _) = True
- _ok _ = False
+union_ = Union
-- ---------------------------------------------------------------------------