summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-07 15:02:40 -0800
committerEdward Z. Yang <ezyang@cs.stanford.edu>2017-02-12 19:14:52 -0800
commit8e9ad240a9345527fc0635b89cc39b4d73b08e03 (patch)
tree0b59844d22acec6cc17ae2cd1a462dfc0c4071c6 /compiler/utils
parenta4ccd330273ccfd136481ee82ae9495f5dd5f146 (diff)
downloadhaskell-8e9ad240a9345527fc0635b89cc39b4d73b08e03.tar.gz
Setup more error context for Backpack operations.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, simonpj, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3101
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