@@ -139,19 +139,12 @@ storable = hack undefined
139 return . inlinePerformIO . withForeignPtr fp $ \p ->
139 return . inlinePerformIO . withForeignPtr fp $ \p ->
140 peek (castPtr $ p `plusPtr` o)
140 peek (castPtr $ p `plusPtr` o)
142−-- | Consume @n@ bytes of input, but succeed only if the predicate
144−takeWith :: Int -> (ByteString -> Bool) -> Parser ByteString
149− then advance n >> return s
150− else fail "takeWith"
152-- | Consume exactly @n@ bytes of input.
142-- | Consume exactly @n@ bytes of input.
153take :: Int -> Parser ByteString
143take :: Int -> Parser ByteString
154−take n = takeWith n (const True)
144+take n0 = do
147+ advance n >> return s
155{-# INLINE take #-}
148{-# INLINE take #-}
157-- | @string s@ parses a sequence of bytes that identically match
150-- | @string s@ parses a sequence of bytes that identically match