summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Outputable.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/utils/Outputable.hs b/compiler/utils/Outputable.hs
index 43979ffdfc..d78411a893 100644
--- a/compiler/utils/Outputable.hs
+++ b/compiler/utils/Outputable.hs
@@ -29,7 +29,7 @@ module Outputable (
semi, comma, colon, dcolon, space, equals, dot, vbar,
arrow, larrow, darrow, arrowt, larrowt, arrowtt, larrowtt,
lparen, rparen, lbrack, rbrack, lbrace, rbrace, underscore,
- blankLine, forAllLit, kindStar,
+ blankLine, forAllLit, kindStar, bullet,
(<>), (<+>), hcat, hsep,
($$), ($+$), vcat,
sep, cat,
@@ -635,12 +635,21 @@ forAllLit = unicodeSyntax (char '∀') (text "forall")
kindStar :: SDoc
kindStar = unicodeSyntax (char '★') (char '*')
+bullet :: SDoc
+bullet = unicode (char '•') (char '*')
+
unicodeSyntax :: SDoc -> SDoc -> SDoc
unicodeSyntax unicode plain = sdocWithDynFlags $ \dflags ->
if useUnicode dflags && useUnicodeSyntax dflags
then unicode
else plain
+unicode :: SDoc -> SDoc -> SDoc
+unicode unicode plain = sdocWithDynFlags $ \dflags ->
+ if useUnicode dflags
+ then unicode
+ else plain
+
nest :: Int -> SDoc -> SDoc
-- ^ Indent 'SDoc' some specified amount
(<>) :: SDoc -> SDoc -> SDoc