I recently found use for a version of the anyWord8 function defined over Zepto, which I implemented as:
import qualified Data.ByteString.Unsafe as BSU
anyWord8 :: Monad m => ZeptoT m Word8
anyWord8 = do
b <- Zepto.take 1
pure (BSU.unsafeHead b)
Since this requires using Data.ByteString.Unsafe, it would be nice to define this in attoparsec itself rather than in my downstream library (which would otherwise not need to make use of unsafe ByteString functions).
I recently found use for a version of the
anyWord8
function defined overZepto
, which I implemented as:Since this requires using
Data.ByteString.Unsafe
, it would be nice to define this inattoparsec
itself rather than in my downstream library (which would otherwise not need to make use of unsafeByteString
functions).