diff options
author | simonmar <unknown> | 2000-04-14 08:29:49 +0000 |
---|---|---|
committer | simonmar <unknown> | 2000-04-14 08:29:49 +0000 |
commit | fd1c3119f74e4cbeb34d54a929a565434d579795 (patch) | |
tree | 25a76633ae4467cafde9ad77573948804b423ce7 | |
parent | f3653fdfe391a2104c24fdcc4931fa695d3b4d60 (diff) | |
download | haskell-fd1c3119f74e4cbeb34d54a929a565434d579795.tar.gz |
[project @ 2000-04-14 08:29:49 by simonmar]
we should be using hPutBufFull here.
-rw-r--r-- | ghc/compiler/utils/FastString.lhs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ghc/compiler/utils/FastString.lhs b/ghc/compiler/utils/FastString.lhs index 3d63e7f26f..4b55c0d13d 100644 --- a/ghc/compiler/utils/FastString.lhs +++ b/ghc/compiler/utils/FastString.lhs @@ -91,7 +91,7 @@ import PrelAddr ( Addr(..) ) import MutableArray ( MutableArray(..) ) #else import PrelArr ( STArray(..), newSTArray ) -import IOExts ( hPutBuf, hPutBufBA ) +import IOExts ( hPutBufFull, hPutBufBAFull ) #endif -- ForeignObj is now exported abstractly. @@ -639,8 +639,7 @@ hPutFS handle (FastString _ l# ba#) | 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" @@ -649,8 +648,11 @@ hPutFS handle (FastString _ l# 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} |