haskell / attoparsec

A fast Haskell library for parsing ByteStrings
http://hackage.haskell.org/package/attoparsec
Other
512 stars 93 forks source link

Binary decoding #170

Open DouglasRaillard opened 4 years ago

DouglasRaillard commented 4 years ago

This is more a feature request than a bug: having some ways of parsing binary content directly from attoparsec would be very useful (types from Data.Word and Data.Int like Word64).

One could argue that Data.Binary.Get monad should be used in this case, but it lacks strictness and combinators. A strict version exists from binary-strict, but there is no combinator library on top of it.

Currently, I'm wrapping Data.Binary.Get monad to make it play with attoparsec, which works but is a bit clunky. Having a simple glue as an attoparsec module would be great.