import MutableArray ( MutableArray(..) )
#else
import PrelArr ( STArray(..), newSTArray )
-import IOExts ( hPutBuf, hPutBufBA )
+import IOExts ( hPutBufFull, hPutBufBAFull )
#endif
-- ForeignObj is now exported abstractly.
| otherwise = hPutBufBA handle (ByteArray bot bot ba#) (I# l#)
#else
| otherwise = do mba <- stToIO $ unsafeThawByteArray (ByteArray (bot::Int) bot ba#)
- hPutBufBA handle mba (I# l#)
- return ()
+ hPutBufBAFull handle mba (I# l#)
#endif
where
bot = error "hPutFS.ba"
hPutFS handle (CharStr a# l#)
| l# ==# 0# = return ()
- | otherwise = do hPutBuf handle (A# a#) (I# l#) ; return ()
-
+#if __GLASGOW_HASKELL__ < 407
+ | otherwise = hPutBuf handle (A# a#) (I# l#)
+#else
+ | otherwise = hPutBufFull handle (A# a#) (I# l#)
+#endif
#endif
\end{code}