Data.CharSet.Unicode.Category

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

Copyright | (c) Edward Kmett 2010-2012
License | BSD3
Maintainer | ekmett@gmail.com
Stability | experimental
Portability | DeriveDataTypeable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.CharSet.Unicode.Category

Contents

- Unicode General Category
- Lookup
- CharSets by Category
  - Letter
    - Letter&
  - Mark
  - Separator
  - Symbol
  - Number
  - Punctuation
  - Other

Description

Provides unicode general categories, which are typically connoted by `\p{Ll}` or `\p{Modifier_Letter}`. Lookups can be constructed using `categories` or individual character sets can be used directly.

A case, `_` and `-` insensitive lookup is provided by `lookupCategory` and can be used to provide behavior similar to that of Perl or PCRE.

Synopsis

- data Category = Category {
  - categoryName :: String
  - categoryAbbreviation :: String
  - categoryCharSet :: CharSet
  - categoryDescription :: String
  }
- categories :: [Category]
- lookupCategory :: String -> Maybe Category
- lookupCategoryCharSet :: String -> Maybe CharSet
- modifierLetter :: CharSet
- otherLetter :: CharSet
- letter :: CharSet
- lowercaseLetter :: CharSet
- uppercaseLetter :: CharSet
- titlecaseLetter :: CharSet
- letterAnd :: CharSet
- nonSpacingMark :: CharSet
- spacingCombiningMark :: CharSet
- enclosingMark :: CharSet
- mark :: CharSet
- space :: CharSet
- lineSeparator :: CharSet
- paragraphSeparator :: CharSet
- separator :: CharSet
- mathSymbol :: CharSet
- currencySymbol :: CharSet
- modifierSymbol :: CharSet
- otherSymbol :: CharSet
- symbol :: CharSet
- decimalNumber :: CharSet
- letterNumber :: CharSet
- otherNumber :: CharSet
- number :: CharSet
- dashPunctuation :: CharSet
- openPunctuation :: CharSet
- closePunctuation :: CharSet
- initialQuote :: CharSet
- finalQuote :: CharSet
- connectorPunctuation :: CharSet
- otherPunctuation :: CharSet
- punctuation :: CharSet
- control :: CharSet
- format :: CharSet
- privateUse :: CharSet
- surrogate :: CharSet
- notAssigned :: CharSet
- other :: CharSet

# Unicode General Category

data Category #

Constructors

Category |
Fields categoryName :: String categoryAbbreviation :: String categoryCharSet :: CharSet categoryDescription :: String

#### Instances

Instances details

Data Category # |
Instance details Defined in Data.CharSet.Unicode.Category Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Category -> c Category # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Category # toConstr :: Category -> Constr # dataTypeOf :: Category -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Category) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Category) # gmapT :: (forall b. Data b => b -> b) -> Category -> Category # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Category -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Category -> r # gmapQ :: (forall d. Data d => d -> u) -> Category -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Category -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Category -> m Category # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Category -> m Category # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Category -> m Category #
Show Category # |
Instance details Defined in Data.CharSet.Unicode.Category Methods showsPrec :: Int -> Category -> ShowS # show :: Category -> String # showList :: [Category] -> ShowS #

# Lookup

categories :: [Category] #

lookupCategory :: String -> Maybe Category #

lookupCategoryCharSet :: String -> Maybe CharSet #

# CharSets by Category

## Letter

modifierLetter :: CharSet #

otherLetter :: CharSet #

letter :: CharSet #

### Letter&

lowercaseLetter :: CharSet #

uppercaseLetter :: CharSet #

titlecaseLetter :: CharSet #

letterAnd :: CharSet #

## Mark

nonSpacingMark :: CharSet #

spacingCombiningMark :: CharSet #

enclosingMark :: CharSet #

mark :: CharSet #

## Separator

space :: CharSet #

lineSeparator :: CharSet #

paragraphSeparator :: CharSet #

separator :: CharSet #

## Symbol

mathSymbol :: CharSet #

currencySymbol :: CharSet #

modifierSymbol :: CharSet #

otherSymbol :: CharSet #

symbol :: CharSet #

## Number

decimalNumber :: CharSet #

letterNumber :: CharSet #

otherNumber :: CharSet #

number :: CharSet #

## Punctuation

dashPunctuation :: CharSet #

openPunctuation :: CharSet #

closePunctuation :: CharSet #

initialQuote :: CharSet #

finalQuote :: CharSet #

connectorPunctuation :: CharSet #

otherPunctuation :: CharSet #

punctuation :: CharSet #

## Other

control :: CharSet #

format :: CharSet #

privateUse :: CharSet #

surrogate :: CharSet #

notAssigned :: CharSet #

other :: CharSet #