[project @ 2000-03-11 23:55:16 by panne]
authorpanne <unknown>
Sat, 11 Mar 2000 23:55:16 +0000 (23:55 +0000)
committerpanne <unknown>
Sat, 11 Mar 2000 23:55:16 +0000 (23:55 +0000)
Saturday Night Fever: hPutBufBA again... >:-(

ghc/compiler/utils/FastString.lhs

index 5d08d76..80b8c39 100644 (file)
@@ -626,8 +626,11 @@ hPutFS handle (FastString _ l# ba#)
   | l# ==# 0#  = return ()
 #if __GLASGOW_HASKELL__ < 405
   | otherwise  = hPutBufBA handle (ByteArray bot ba#) (I# l#)
-#else
+#elsif __GLASGOW_HASKELL__ < 407
   | 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#)
 #endif
  where
   bot = error "hPutFS.ba"