X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Futils%2FPretty.lhs;h=5219484569c7b817e16f270b7d46764cd4977f88;hp=94173ab5022ca8591341089da9f7e2747b97fe98;hb=cee4bfd3a0c0852946966333bbff47654e9e35b2;hpb=331923fd7adec11980e776dd33442c654cca0280 diff --git a/compiler/utils/Pretty.lhs b/compiler/utils/Pretty.lhs index 94173ab..5219484 100644 --- 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 +-- 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 }