summaryrefslogtreecommitdiff
path: root/compiler/utils/Outputable.lhs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-07-15 00:10:27 +0100
committerIan Lynagh <igloo@earth.li>2012-07-15 00:36:53 +0100
commit509d2ad24e377b8f9d3487ab7a3b2c3d1d936eaa (patch)
treed4f450196a096549acbc2ee7a744da9f3f977f74 /compiler/utils/Outputable.lhs
parent2f01debc33a3ba60feaf2f9add0778bbd2ab81c2 (diff)
downloadhaskell-509d2ad24e377b8f9d3487ab7a3b2c3d1d936eaa.tar.gz
Add a separate FastZString type
FastStrings are now always UTF8-encoded. There's no StringTable for FastZString, but I don't think one is needed. We only ever make a FastZString by running zEncodeFS on a FastString, and the FastStrings are shared via the FastString StringTable, so we get the same FastZString from the IORef.
Diffstat (limited to 'compiler/utils/Outputable.lhs')
-rw-r--r--compiler/utils/Outputable.lhs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs
index 8d97de8394..abc172e1c9 100644
--- a/compiler/utils/Outputable.lhs
+++ b/compiler/utils/Outputable.lhs
@@ -20,7 +20,7 @@ module Outputable (
interppSP, interpp'SP, pprQuotedList, pprWithCommas, quotedListWithOr,
empty, nest,
char,
- text, ftext, ptext,
+ text, ftext, ptext, ztext,
int, intWithCommas, integer, float, double, rational,
parens, cparen, brackets, braces, quotes, quote,
doubleQuotes, angleBrackets, paBrackets,
@@ -419,6 +419,7 @@ char :: Char -> SDoc
text :: String -> SDoc
ftext :: FastString -> SDoc
ptext :: LitString -> SDoc
+ztext :: FastZString -> SDoc
int :: Int -> SDoc
integer :: Integer -> SDoc
float :: Float -> SDoc
@@ -430,6 +431,7 @@ char c = docToSDoc $ Pretty.char c
text s = docToSDoc $ Pretty.text s
ftext s = docToSDoc $ Pretty.ftext s
ptext s = docToSDoc $ Pretty.ptext s
+ztext s = docToSDoc $ Pretty.ztext s
int n = docToSDoc $ Pretty.int n
integer n = docToSDoc $ Pretty.integer n
float n = docToSDoc $ Pretty.float n