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

Copyright | Edward Kmett 2011 Bryan O'Sullivan 2008
License | BSD3
Maintainer | ekmett@gmail.com
Stability | experimental
Portability | non-portable (BangPatterns, MagicHash)
Safe Haskell | Trustworthy
Language | Haskell98

Data.CharSet.ByteSet

Contents

- Data type
- Construction
- Lookup

Description

Fast set membership tests for byte values, The set representation is unboxed for efficiency and uses a lookup table. This is a fairly minimal API. You probably want to use CharSet.

Synopsis

- newtype ByteSet = ByteSet ByteString
- fromList :: [Word8] -> ByteSet
- member :: Word8 -> ByteSet -> Bool

# Data type

newtype ByteSet #

Constructors

ByteSet ByteString |

Instances

Eq ByteSet # |
Methods (==) :: ByteSet -> ByteSet -> Bool # (/=) :: ByteSet -> ByteSet -> Bool #
Ord ByteSet # |
Methods compare :: ByteSet -> ByteSet -> Ordering # (<) :: ByteSet -> ByteSet -> Bool # (<=) :: ByteSet -> ByteSet -> Bool # (>) :: ByteSet -> ByteSet -> Bool # (>=) :: ByteSet -> ByteSet -> Bool # max :: ByteSet -> ByteSet -> ByteSet # min :: ByteSet -> ByteSet -> ByteSet #
Show ByteSet # |
Methods showsPrec :: Int -> ByteSet -> ShowS # show :: ByteSet -> String # showList :: [ByteSet] -> ShowS #

# Construction

fromList :: [Word8] -> ByteSet #

# Lookup

member :: Word8 -> ByteSet -> Bool #

Check the set for membership.