summaryrefslogtreecommitdiff
path: root/ghc/compiler/utils/Outputable.lhs
diff options
context:
space:
mode:
authorsof <unknown>1998-04-07 21:33:40 +0000
committersof <unknown>1998-04-07 21:33:40 +0000
commitdc52a1d0432805cdc0236f804953c7d948fd5db0 (patch)
treea4a07b6de67f3654e80489971d762d2bf94538b4 /ghc/compiler/utils/Outputable.lhs
parent3d82495b95adcd4d59c2491356348ef91619d06c (diff)
downloadhaskell-dc52a1d0432805cdc0236f804953c7d948fd5db0.tar.gz
[project @ 1998-04-07 21:33:40 by sof]
Undo previous commit
Diffstat (limited to 'ghc/compiler/utils/Outputable.lhs')
-rw-r--r--ghc/compiler/utils/Outputable.lhs28
1 files changed, 3 insertions, 25 deletions
diff --git a/ghc/compiler/utils/Outputable.lhs b/ghc/compiler/utils/Outputable.lhs
index fb73907943..c34404b2f8 100644
--- a/ghc/compiler/utils/Outputable.lhs
+++ b/ghc/compiler/utils/Outputable.lhs
@@ -280,32 +280,10 @@ pprCols = (100 :: Int) -- could make configurable
printDoc :: Mode -> Handle -> Doc -> IO ()
printDoc mode hdl doc
= fullRender mode pprCols 1.5 put done doc
-{-
- = _readHandle hdl >>= \ htype ->
- let fp = _filePtr htype in
- fullRender mode pprCols 1.5 (put (fp::_Addr)) (done fp) doc
--}
where
-{-
- put fp (Chr c) next = _scc_ "hPutChar" ((_ccall_ stg_putc c (fp::_Addr))::PrimIO ()) `seqPrimIO` next
- put fp (Str s) next = _scc_ "hPutStr" (put_str fp s) >> next
- put fp (PStr s) next = _scc_ "hPutFS" (put_str fp (_UNPK_ s)) >> next
-
- put_str fp (c1@(C# _) : cs)
- = _ccall_ stg_putc c1 (fp::_Addr) `seqPrimIO`
- put_str fp cs
- put_str fp [] = return ()
--}
- put (Chr c) next = _scc_ "hPutChar" (hPutChar hdl c) >> next
- put (Str s) next = _scc_ "hPutStr" (hPutStr hdl s) >> next
- put (PStr s) next = _scc_ "hPutFS" (hPutFS hdl s) >> next
-
-{-
- string_txt (Chr c) s2 = c : s2
- string_txt (Str s1) s2 = s1 ++ s2
- string_txt (PStr s1) s2 = _UNPK_ s1 ++ s2
- done fp = ((_ccall_ stg_putc '\n' (fp::_Addr))::PrimIO ()) `seqPrimIO` return () --hPutChar hdl '\n'
--}
+ put (Chr c) next = hPutChar hdl c >> next
+ put (Str s) next = hPutStr hdl s >> next
+ put (PStr s) next = hPutFS hdl s >> next
done = hPutChar hdl '\n'
\end{code}