charset-0.3.7.1: Fast unicode character sets based on complemented PATRICIA tries

Copyright(c) Edward Kmett 2010-2011
LicenseBSD3
Maintainerekmett@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell98

Data.CharSet

Contents

Description

Fast set membership tests for Char values

Stored as a (possibly negated) IntMap and a fast set used for the head byte.

The set of valid (possibly negated) head bytes is stored unboxed as a 32-byte bytestring-based lookup table.

Designed to be imported qualified:

import Data.CharSet (CharSet)
import qualified Data.CharSet as CharSet

Synopsis

Set type

Operators

Query

null :: CharSet -> Bool

O(n) worst case

size :: CharSet -> Int

O(n)

Construction

build :: (Char -> Bool) -> CharSet

Combine

Filter

Map

map :: (Char -> Char) -> CharSet -> CharSet

Fold

fold :: (Char -> b -> b) -> b -> CharSet -> b

Conversion

List

Ordered list

IntMaps

Array