 | attoparsec-0.8.1.0: Fast combinator parsing for bytestrings | Contents | Index |
|
| Data.Attoparsec.FastSet | | Portability | unknown | | Stability | experimental | | Maintainer | bos@serpentine.com |
|
|
|
|
|
| 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
|
|
| data FastSet |
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 |