summaryrefslogtreecommitdiff
path: root/ghc/compiler/utils/Binary.hs
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-12-12 16:35:14 +0000
committersimonmar <unknown>2002-12-12 16:35:14 +0000
commit6d353fcbc9480b46cc675b5d7f077fd6cecee377 (patch)
tree616875f68ff50c1907b95f9257fa7cc42996a798 /ghc/compiler/utils/Binary.hs
parenta0fafeff92725ef29c1e2ed5caf834cba6b59051 (diff)
downloadhaskell-6d353fcbc9480b46cc675b5d7f077fd6cecee377.tar.gz
[project @ 2002-12-12 16:35:14 by simonmar]
Fix to build with 4.08.x
Diffstat (limited to 'ghc/compiler/utils/Binary.hs')
-rw-r--r--ghc/compiler/utils/Binary.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/ghc/compiler/utils/Binary.hs b/ghc/compiler/utils/Binary.hs
index 241406746d..4df582a36f 100644
--- a/ghc/compiler/utils/Binary.hs
+++ b/ghc/compiler/utils/Binary.hs
@@ -297,7 +297,11 @@ getWord8 (BinMem _ ix_r sz_r arr_r) = do
ix <- readFastMutInt ix_r
sz <- readFastMutInt sz_r
when (ix >= sz) $
+#if __GLASGOW_HASKELL__ <= 408
+ throw (mkIOError eofErrorType "Data.Binary.getWord8" Nothing Nothing)
+#else
ioError (mkIOError eofErrorType "Data.Binary.getWord8" Nothing Nothing)
+#endif
arr <- readIORef arr_r
w <- unsafeRead arr ix
writeFastMutInt ix_r (ix+1)