Data.CharSet.ByteSet

charset-0.3.11: 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 #

Constructors

ByteSet ByteString |

#### Instances

Instances details

Show ByteSet # |
Instance details Defined in Data.CharSet.ByteSet Methods showsPrec :: Int -> ByteSet -> ShowS # show :: ByteSet -> String # showList :: [ByteSet] -> ShowS #
Eq ByteSet # |
Instance details Defined in Data.CharSet.ByteSet Methods (==) :: ByteSet -> ByteSet -> Bool # (/=) :: ByteSet -> ByteSet -> Bool #
Ord ByteSet # |
Instance details Defined in Data.CharSet.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 #

# Construction

fromList :: [Word8] -> ByteSet #

# Lookup

member :: Word8 -> ByteSet -> Bool #

Check the set for membership.