From: sof Date: Tue, 5 Mar 2002 21:05:59 +0000 (+0000) Subject: [project @ 2002-03-05 21:05:59 by sof] X-Git-Tag: Approx_11550_changesets_converted~2303 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=95210818cc1978e143339a36fe7f2ef851c0fbd4;p=ghc-hetmet.git [project @ 2002-03-05 21:05:59 by sof] make it compile with 5.02 --- 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