flatparse-0.4.1.0: High-performance parsing from strict bytestrings
Safe HaskellSafe-Inferred
LanguageHaskell2010

FlatParse.Basic.Bytes

Description

Bytestring parsers.

Module dependency complications prevent us from placing these in FlatParse.Basic.Base.

Synopsis

Documentation

bytes :: [Word] -> Q Exp Source #

Read a sequence of bytes. This is a template function, you can use it as $(bytes [3, 4, 5]), for example, and the splice has type Parser e (). For a non-TH variant see byteString.

bytesUnsafe :: [Word] -> Q Exp Source #

Template function, creates a Parser e () which unsafely parses a given sequence of bytes.

The caller must guarantee that the input has enough bytes.