Data.Attoparsec.Text.FastSet

attoparsec-text-0.8.5.1: Fast combinator parsing for texts

Portability | unknown
Stability | experimental
Maintainer | felipe.lessa@gmail.com

Data.Attoparsec.Text.FastSet

Contents

- Data type
- Construction
- Lookup
- Handy interface

Description

Fast set membership tests for `Char` values. The set representation is unboxed for efficiency. We test for membership using a binary search.

Synopsis

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

# Data type

data FastSet

Instances

Eq FastSet |
Ord FastSet |
Show FastSet |

# Construction

fromList :: [Char] -> FastSet

set :: Text -> FastSet

Create a set.

# Lookup

member :: Char -> FastSet -> Bool

Check the set for membership.

# Handy interface

charClass :: String -> FastSet