Data.Attoparsec.Text.FastSet

attoparsec-0.14.4: Fast combinator parsing for bytestrings and text

Copyright | Felipe Lessa 2010 Bryan O'Sullivan 2007-2015
License | BSD3
Maintainer | felipe.lessa@gmail.com
Stability | experimental
Portability | unknown
Safe Haskell | None
Language | Haskell2010

Data.Attoparsec.Text.FastSet

Contents

- Data type
- Construction
- Lookup
- Handy interface

Description

Fast set membership tests for `Char` values. We test for membership using a hashtable implemented with Robin Hood collision resolution. The set representation is unboxed, and the characters and hashes interleaved, for efficiency.

Synopsis

- data FastSet
- fromList :: String -> FastSet
- set :: Text -> FastSet
- member :: Char -> FastSet -> Bool
- charClass :: String -> FastSet

# Data type

data FastSet #

# Construction

fromList :: String -> FastSet #

set :: Text -> FastSet #

# Lookup

member :: Char -> FastSet -> Bool #

Check the set for membership.

# Handy interface

charClass :: String -> FastSet #