From 95210818cc1978e143339a36fe7f2ef851c0fbd4 Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 5 Mar 2002 21:05:59 +0000 Subject: [PATCH 1/1] [project @ 2002-03-05 21:05:59 by sof] make it compile with 5.02 --- ghc/compiler/utils/Binary.hs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/utils/Binary.hs b/ghc/compiler/utils/Binary.hs index a963c0c..52e1bee 100644 --- a/ghc/compiler/utils/Binary.hs +++ b/ghc/compiler/utils/Binary.hs @@ -60,7 +60,7 @@ import Exception import GlaExts hiding (ByteArray, newByteArray, freezeByteArray) import Array import IO -import PrelIOBase ( IOError(..), IOErrorType(..) ) +import PrelIOBase ( IOError(..), IOErrorType(..), IOException(..) ) import PrelReal ( Ratio(..) ) import PrelIOBase ( IO(..) ) #else @@ -88,13 +88,19 @@ type BinArray = MutableByteArray RealWorld Int newArray_ bounds = stToIO (newCharArray bounds) unsafeWrite arr ix e = stToIO (writeWord8Array arr ix e) unsafeRead arr ix = stToIO (readWord8Array arr ix) +#if __GLASGOW_HASKELL__ < 411 newByteArray# = newCharArray# +#endif hPutArray h arr sz = hPutBufBAFull h arr sz hGetArray h sz = hGetBufBAFull h sz mkIOError :: IOErrorType -> String -> Maybe Handle -> Maybe FilePath -> Exception mkIOError t location maybe_hdl maybe_filename - = IOException (IOError maybe_hdl t location "") + = IOException (IOError maybe_hdl t location "" +#if __GLASGOW_HASKELL__ > 411 + maybe_filename +#endif + ) eofErrorType = EOF -- 1.7.10.4