attoparsec-0.14.4: Fast combinator parsing for bytestrings and text
CopyrightBryan O'Sullivan 2007-2015
LicenseBSD3
Maintainerbos@serpentine.com
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Data.Attoparsec.ByteString.FastSet

Description

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

Synopsis

Data type

data FastSet Source #

Instances

Instances details
Eq FastSet Source # 
Instance details

Defined in Data.Attoparsec.ByteString.FastSet

Methods

(==) :: FastSet -> FastSet -> Bool #

(/=) :: FastSet -> FastSet -> Bool #

Ord FastSet Source # 
Instance details

Defined in Data.Attoparsec.ByteString.FastSet

Show FastSet Source # 
Instance details

Defined in Data.Attoparsec.ByteString.FastSet

Construction

set :: ByteString -> FastSet Source #

Create a set.

Lookup

memberChar :: Char -> FastSet -> Bool Source #

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

memberWord8 :: Word8 -> FastSet -> Bool Source #

Check the set for membership.

Debugging

Handy interface