summaryrefslogtreecommitdiff
path: root/compiler/utils/Binary.hs
diff options
context:
space:
mode:
authorBrian Foley <bpfoley@google.com>2020-03-13 22:34:15 -0700
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-03-15 03:58:18 -0400
commitb4774598e6bd060b1b4230b11b734ca40022980d (patch)
tree9b28fdfa3aaa36a41ebc711efa795005953dc93d /compiler/utils/Binary.hs
parentd30aeb4b38381758025bc1002eb2135ad6bc58b8 (diff)
downloadhaskell-b4774598e6bd060b1b4230b11b734ca40022980d.tar.gz
Remove some dead code
From the notes.ghc.drop list found using weeder in #17713
Diffstat (limited to 'compiler/utils/Binary.hs')
-rw-r--r--compiler/utils/Binary.hs17
1 files changed, 0 insertions, 17 deletions
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index 1c52cb56fb..16d7ccf37d 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -31,10 +31,8 @@ module Binary
-- closeBin,
seekBin,
- seekBy,
tellBin,
castBin,
- isEOFBin,
withBinBuffer,
writeBinMem,
@@ -184,21 +182,6 @@ seekBin h@(BinMem _ ix_r sz_r _) (BinPtr !p) = do
then do expandBin h p; writeFastMutInt ix_r p
else writeFastMutInt ix_r p
-seekBy :: BinHandle -> Int -> IO ()
-seekBy h@(BinMem _ ix_r sz_r _) !off = do
- sz <- readFastMutInt sz_r
- ix <- readFastMutInt ix_r
- let ix' = ix + off
- if (ix' >= sz)
- then do expandBin h ix'; writeFastMutInt ix_r ix'
- else writeFastMutInt ix_r ix'
-
-isEOFBin :: BinHandle -> IO Bool
-isEOFBin (BinMem _ ix_r sz_r _) = do
- ix <- readFastMutInt ix_r
- sz <- readFastMutInt sz_r
- return (ix >= sz)
-
writeBinMem :: BinHandle -> FilePath -> IO ()
writeBinMem (BinMem _ ix_r _ arr_r) fn = do
h <- openBinaryFile fn WriteMode