trifecta-0.42: A modern parser combinator library with convenient diagnostics

Portabilitynon-portable (Data, BangPatterns, MagicHash)
Stabilityexperimental
Maintainerekmett@gmail.com

Text.Trifecta.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 Text.Trifecta.CharSet (CharSet)
 import qualified Text.Trifecta.CharSet as CharSet

Synopsis

Set type

Operators

Query

null :: CharSet -> BoolSource

O(n) worst case

Construction

Combine

Filter

Map

Fold

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

Conversion

List

Ordered list

IntMaps

Array