attoparsec-0.8.1.0: Fast combinator parsing for bytestringsContentsIndex
Data.Attoparsec.FastSet
Portabilityunknown
Stabilityexperimental
Maintainerbos@serpentine.com
Contents
Data type
Construction
Lookup
Debugging
Handy interface
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 FastSet
fromList :: [Word8] -> FastSet
set :: ByteString -> FastSet
memberChar :: Char -> FastSet -> Bool
memberWord8 :: Word8 -> FastSet -> Bool
fromSet :: FastSet -> ByteString
charClass :: String -> FastSet
Data type
data FastSet
show/hide Instances
Construction
fromList :: [Word8] -> FastSet
set :: ByteString -> FastSet
Create a set.
Lookup
memberChar :: Char -> FastSet -> Bool
Check the set for membership. Only works with 8-bit characters: characters above code point 255 will give wrong answers.
memberWord8 :: Word8 -> FastSet -> Bool
Check the set for membership.
Debugging
fromSet :: FastSet -> ByteString
Handy interface
charClass :: String -> FastSet
Produced by Haddock version 2.7.2