projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
331923f
)
add a comment to the effect that printDoc prints FastStrings in UTF-8
author
Simon Marlow
<marlowsd@gmail.com>
Fri, 11 Jul 2008 15:11:35 +0000
(15:11 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Fri, 11 Jul 2008 15:11:35 +0000
(15:11 +0000)
compiler/utils/Pretty.lhs
patch
|
blob
|
history
diff --git
a/compiler/utils/Pretty.lhs
b/compiler/utils/Pretty.lhs
index
94173ab
..
5219484
100644
(file)
--- a/
compiler/utils/Pretty.lhs
+++ b/
compiler/utils/Pretty.lhs
@@
-996,6
+996,10
@@
spaces n | n <=# _ILIT(0) = ""
pprCols :: Int
pprCols = 120 -- could make configurable
pprCols :: Int
pprCols = 120 -- could make configurable
+-- NB. printDoc prints FastStrings in UTF-8: hPutFS below does no decoding.
+-- This is what we usually want, because the IO library has no encoding
+-- functionality, and we're assuming UTF-8 source code so we might as well
+-- assume UTF-8 output too.
printDoc :: Mode -> Handle -> Doc -> IO ()
printDoc LeftMode hdl doc
= do { printLeftRender hdl doc; hFlush hdl }
printDoc :: Mode -> Handle -> Doc -> IO ()
printDoc LeftMode hdl doc
= do { printLeftRender hdl doc; hFlush hdl }