@@ -9,6 +9,7 @@ module BitsGet
9 , readWord8
9 , readWord8
10 , readWord16be
10 , readWord16be
11 , runBitGet
11 , runBitGet
14 , getWord8
15 , getWord8
@@ -219,6 +220,13 @@ instance Applicative BitGet where
219 pure x = return x
220 pure x = return x
220 fm <*> m = fm >>= \f -> m >>= \v -> return (f v)
221 fm <*> m = fm >>= \f -> m >>= \v -> return (f v)
223+runBitGetSimple :: BitGet a -> Get a
224+runBitGetSimple bg = do
227+ Left err -> fail err
222runBitGet :: BitGet a -> Get (Either String a)
230runBitGet :: BitGet a -> Get (Either String a)
223runBitGet bg = do
231runBitGet bg = do
224 bs <- getS -- get the current chunk
232 bs <- getS -- get the current chunk