attoparsec-0.5: Combinator parsing with Data.ByteString.Lazy

Portabilityunknown
Stabilityexperimental
Maintainerbos@serpentine.com

Data.ParserCombinators.Attoparsec.FastSet

Contents

Description

Fast set membership tests for Word8 and 8-bit Char values. The set representation is unboxed for efficiency. For sets of fewer than 32 elements, we test for membership using a binary search. For larger sets, we use a lookup table.

Synopsis

Data type

Construction

set :: ByteString -> FastSetSource

Create a set.

Lookup

memberChar :: Char -> FastSet -> BoolSource

Check the set for membership. Only works with 8-bit characters: characters above code point 255 will give wrong answers.

memberWord8 :: Word8 -> FastSet -> BoolSource

Check the set for membership.

Debugging