projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2001-09-14 15:53:41 by sewardj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
utils
/
Outputable.lhs
diff --git
a/ghc/compiler/utils/Outputable.lhs
b/ghc/compiler/utils/Outputable.lhs
index
165ce03
..
7aa2461
100644
(file)
--- a/
ghc/compiler/utils/Outputable.lhs
+++ b/
ghc/compiler/utils/Outputable.lhs
@@
-17,6
+17,7
@@
module Outputable (
ifPprDebug, unqualStyle,
SDoc, -- Abstract
ifPprDebug, unqualStyle,
SDoc, -- Abstract
+ docToSDoc,
interppSP, interpp'SP, pprQuotedList, pprWithCommas,
empty, nest,
text, char, ptext,
interppSP, interpp'SP, pprQuotedList, pprWithCommas,
empty, nest,
text, char, ptext,
@@
-224,6
+225,9
@@
showSDocDebug d = show (d PprDebug)
\end{code}
\begin{code}
\end{code}
\begin{code}
+docToSDoc :: Doc -> SDoc
+docToSDoc d = \_ -> d
+
empty sty = Pretty.empty
text s sty = Pretty.text s
char c sty = Pretty.char c
empty sty = Pretty.empty
text s sty = Pretty.text s
char c sty = Pretty.char c
@@
-371,8
+375,8
@@
showCharLit c rest
-- of Char and String.
pprHsChar :: Int -> SDoc
-- of Char and String.
pprHsChar :: Int -> SDoc
-pprHsChar c | not (inCharRange c) = char '\\' <> show (fromIntegral c :: Word32)
- | otherwise = text (show (chr c))
+pprHsChar c | c > 0x10ffff = char '\\' <> text (show (fromIntegral c :: Word32))
+ | otherwise = text (show (chr c))
pprHsString :: FastString -> SDoc
pprHsString fs = text (show (unpackFS fs))
pprHsString :: FastString -> SDoc
pprHsString fs = text (show (unpackFS fs))