charset-0.3.10: 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 | Haskell2010

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 one bit per byte to represent the presence or absence of a byte in the set.

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 Source #

Constructors

ByteSet ByteString |

#### Instances

Instances details

Show ByteSet Source # |
Instance details Defined in Data.CharSet.ByteSet Methods showsPrec :: Int -> ByteSet -> ShowS Source # show :: ByteSet -> String Source # showList :: [ByteSet] -> ShowS Source #
Eq ByteSet Source # |
Instance details Defined in Data.CharSet.ByteSet Methods (==) :: ByteSet -> ByteSet -> Bool Source # (/=) :: ByteSet -> ByteSet -> Bool Source #
Ord ByteSet Source # |
Instance details Defined in Data.CharSet.ByteSet Methods compare :: ByteSet -> ByteSet -> Ordering Source # (<) :: ByteSet -> ByteSet -> Bool Source # (<=) :: ByteSet -> ByteSet -> Bool Source # (>) :: ByteSet -> ByteSet -> Bool Source # (>=) :: ByteSet -> ByteSet -> Bool Source # max :: ByteSet -> ByteSet -> ByteSet Source # min :: ByteSet -> ByteSet -> ByteSet Source #

# Construction

fromList :: [Word8] -> ByteSet Source #

# Lookup

member :: Word8 -> ByteSet -> Bool Source #

Check the set for membership.