Skip to content
Snippets Groups Projects
Commit dc52a1d0 authored by sof's avatar sof
Browse files

[project @ 1998-04-07 21:33:40 by sof]

Undo previous commit
parent 3d82495b
No related merge requests found
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment