on master help sign in
Disable joinGet

This feature relies on that you can take/set the internal state of the binary monad, something which we currently do not allow in the main branch.

commit4cd365b613f897707382f319a9cba3a9b363f3b1 authorLennart Kolmodin <kolmodin@gmail.com> dateWed 1 Jun 2011, 08:42 (15 years ago) parent6e65de6
1 file changed+3−1
BitsGet.hs+3−1
BitsGet.hs+3−1
@@ -5,7 +5,7 @@ module BitsGet
55 , runBitGet
66 , runBitGetSimple
77 , BitGet
8− , joinGet
8+ -- , joinGet
99
1010 , getBool
1111 , getWord8
@@ -68,6 +68,7 @@ incS (S bs n) o =
6868 let (d,n') = divMod (n+o) 8
6969 in S (unsafeDrop d bs) n'
7070
71+{-
7172joinGet :: Get a -> BitGet a
7273joinGet m = C $ \s@(S bs o) kf ks -> do
7374 -- put back the rest of the current chunk
@@ -80,6 +81,7 @@ joinGet m = C $ \s@(S bs o) kf ks -> do
8081 bs' <- getS
8182 let s' = S bs' 0
8283 ks s' a
84+-}
8385
8486readByteString :: S -> Int -> T ByteString S
8587readByteString s@(S bs o) n