Date: Wednesday, January 8, 2020 @ 19:35:57 Author: felixonmars Revision: 550502
add fix for ghc 8.8 - add missing patch Added: haskell-bzlib/trunk/ghc-8.8.patch ---------------+ ghc-8.8.patch | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) Added: ghc-8.8.patch =================================================================== --- ghc-8.8.patch (rev 0) +++ ghc-8.8.patch 2020-01-08 19:35:57 UTC (rev 550502) @@ -0,0 +1,62 @@ +--- Codec/Compression/BZip/Stream.hsc.orig 2020-01-09 03:26:18.302155300 +0800 ++++ Codec/Compression/BZip/Stream.hsc 2020-01-09 03:27:21.602183680 +0800 +@@ -21,7 +21,7 @@ + finalise, + + -- * Initialisation +- compressInit, ++ compressInit, + decompressInit, + + -- ** Initialisation parameters +@@ -71,6 +71,7 @@ + import System.IO (hPutStrLn, stderr) + import Control.Applicative (Applicative(..)) + import Control.Monad (liftM, ap) ++import Control.Monad.Fail + import Control.Exception (assert) + + import Prelude hiding (length) +@@ -88,8 +89,8 @@ + -- Now that we're setting a new input buffer, we can be sure that zlib no + -- longer has a reference to the old one. Therefore this is the last point + -- at which the old buffer had to be retained. It's safe to release now. +- inBuf <- getInBuf +- unsafeLiftIO $ touchForeignPtr inBuf ++ inBuf <- getInBuf ++ unsafeLiftIO $ touchForeignPtr inBuf + + -- now set the available input buffer ptr and length + setInBuf inBuf' +@@ -177,11 +178,11 @@ + + result <- compress_ action + outFree' <- getOutFree +- ++ + -- number of bytes of extra output there is available as a result of + -- the call to deflate: + let outExtra = outFree - outFree' +- ++ + outAvail <- getOutAvail + setOutAvail (outAvail + outExtra) + return result +@@ -233,6 +234,8 @@ + -- m >>= f = (m `thenZ` \a -> consistencyCheck `thenZ_` returnZ a) `thenZ` f + (>>) = thenZ_ + return = returnZ ++ ++instance MonadFail Stream where + fail = (finalise >>) . failZ + + returnZ :: a -> Stream a +@@ -452,7 +455,7 @@ + -- require about 3700k to decompress. To support decompression of any file in + -- less than 4Mb there is the option to decompress using approximately half + -- this amount of memory, about 2300k. Decompression speed is also halved, +--- so you should use this option only where necessary. ++-- so you should use this option only where necessary. + -- + data MemoryLevel = + DefaultMemoryLevel -- ^ The default.