diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2017-02-07 15:02:40 -0800 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2017-02-12 19:14:52 -0800 |
commit | 8e9ad240a9345527fc0635b89cc39b4d73b08e03 (patch) | |
tree | 0b59844d22acec6cc17ae2cd1a462dfc0c4071c6 /compiler/utils | |
parent | a4ccd330273ccfd136481ee82ae9495f5dd5f146 (diff) | |
download | haskell-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.hs | 11 |
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 |