Movatterモバイル変換


[0]ホーム

URL:


binary-parser-0.5.7.7: An efficient but limited parser API specialised to bytestrings
Safe HaskellSafe-Inferred
LanguageHaskell2010

BinaryParser

Contents

Synopsis

Documentation

dataBinaryParser aSource#

A highly-efficient parser specialised for strictByteStrings.

Supports the roll-back and alternative branching on the basis of theAlternative interface.

Does not generate fancy error-messages, which contributes to its efficiency.

Instances

Instances details
MonadFailBinaryParserSource# 
Instance details

Defined inBinaryParser

AlternativeBinaryParserSource# 
Instance details

Defined inBinaryParser

ApplicativeBinaryParserSource# 
Instance details

Defined inBinaryParser

FunctorBinaryParserSource# 
Instance details

Defined inBinaryParser

Methods

fmap :: (a -> b) ->BinaryParser a ->BinaryParser b#

(<$) :: a ->BinaryParser b ->BinaryParser a#

MonadBinaryParserSource# 
Instance details

Defined inBinaryParser

MonadPlusBinaryParserSource# 
Instance details

Defined inBinaryParser

MonadErrorTextBinaryParserSource# 
Instance details

Defined inBinaryParser

run ::BinaryParser a ->ByteString ->EitherText aSource#

Apply a parser to bytes.

failure ::Text ->BinaryParser aSource#

Fail with a message.

byte ::BinaryParserWord8Source#

Consume a single byte.

matchingByte :: (Word8 ->EitherText a) ->BinaryParser aSource#

Consume a single byte, which satisfies the predicate.

bytesOfSize ::Int ->BinaryParserByteStringSource#

Consume an amount of bytes.

bytesWhile :: (Word8 ->Bool) ->BinaryParserByteStringSource#

Consume multiple bytes, which satisfy the predicate.

unitOfSize ::Int ->BinaryParser ()Source#

Skip an amount of bytes.

unitOfBytes ::ByteString ->BinaryParser ()Source#

Skip specific bytes, while failing if they don't match.

unitWhile :: (Word8 ->Bool) ->BinaryParser ()Source#

Skip bytes, which satisfy the predicate.

remainders ::BinaryParserByteStringSource#

Consume all the remaining bytes.

fold :: (a ->Word8 ->Maybe a) -> a ->BinaryParser aSource#

Left-fold the bytes, terminating before the byte, on which the step function returns Nothing.

endOfInput ::BinaryParser ()Source#

Fail if the input hasn't ended.

sized ::Int ->BinaryParser a ->BinaryParser aSource#

Run a subparser passing it a chunk of the current input of the specified size.

Extras

storableOfSize ::Storable a =>Int ->BinaryParser aSource#

Storable value of the given amount of bytes.

beWord16 ::BinaryParserWord16Source#

Big-endian word of 2 bytes.

leWord16 ::BinaryParserWord16Source#

Little-endian word of 2 bytes.

beWord32 ::BinaryParserWord32Source#

Big-endian word of 4 bytes.

leWord32 ::BinaryParserWord32Source#

Little-endian word of 4 bytes.

beWord64 ::BinaryParserWord64Source#

Big-endian word of 8 bytes.

leWord64 ::BinaryParserWord64Source#

Little-endian word of 8 bytes.

asciiIntegral ::Integral a =>BinaryParser aSource#

Integral number encoded in ASCII.

Produced byHaddock version 2.29.1


[8]ページ先頭

©2009-2025 Movatter.jp