-----------------------------------------------------------------------------
-- |
-- Module      :  Data.CharSet.Common
-- Copyright   :  (c) Edward Kmett 2010-2012
-- License     :  BSD3
-- Maintainer  :  ekmett@gmail.com
-- Stability   :  experimental
-- Portability :  portable
--
-- The various character classifications from "Data.Char" as 'CharSet's
-------------------------------------------------------------------------------

module Data.CharSet.Common
    (
    -- ** Data.Char classes
      control
    , space
    , lower
    , upper
    , alpha
    , alphaNum
    , print
    , digit
    , octDigit
    , letter
    , mark
    , number
    , punctuation
    , symbol
    , separator
    , ascii
    , latin1
    , asciiUpper
    , asciiLower
    ) where

import Prelude ()
import Data.Char
import Data.CharSet

-- Haskell character classes from Data.Char
control, space, lower, upper, alpha, alphaNum,
  print, digit, octDigit, letter, mark, number,
  punctuation, symbol, separator, ascii, latin1
  , asciiUpper, asciiLower :: CharSet

control :: CharSet
control = (Char -> Bool) -> CharSet
build Char -> Bool
isControl
space :: CharSet
space = (Char -> Bool) -> CharSet
build Char -> Bool
isSpace
lower :: CharSet
lower = (Char -> Bool) -> CharSet
build Char -> Bool
isLower
upper :: CharSet
upper = (Char -> Bool) -> CharSet
build Char -> Bool
isUpper
alpha :: CharSet
alpha = (Char -> Bool) -> CharSet
build Char -> Bool
isAlpha
alphaNum :: CharSet
alphaNum = (Char -> Bool) -> CharSet
build Char -> Bool
isAlphaNum
print :: CharSet
print = (Char -> Bool) -> CharSet
build Char -> Bool
isPrint
digit :: CharSet
digit = (Char -> Bool) -> CharSet
build Char -> Bool
isDigit
octDigit :: CharSet
octDigit = (Char -> Bool) -> CharSet
build Char -> Bool
isOctDigit
letter :: CharSet
letter = (Char -> Bool) -> CharSet
build Char -> Bool
isLetter
mark :: CharSet
mark = (Char -> Bool) -> CharSet
build Char -> Bool
isMark
number :: CharSet
number = (Char -> Bool) -> CharSet
build Char -> Bool
isNumber
punctuation :: CharSet
punctuation = (Char -> Bool) -> CharSet
build Char -> Bool
isPunctuation
symbol :: CharSet
symbol = (Char -> Bool) -> CharSet
build Char -> Bool
isSymbol
separator :: CharSet
separator = (Char -> Bool) -> CharSet
build Char -> Bool
isSeparator
ascii :: CharSet
ascii = (Char -> Bool) -> CharSet
build Char -> Bool
isAscii
latin1 :: CharSet
latin1 = (Char -> Bool) -> CharSet
build Char -> Bool
isLatin1
asciiUpper :: CharSet
asciiUpper = (Char -> Bool) -> CharSet
build Char -> Bool
isAsciiUpper
asciiLower :: CharSet
asciiLower = (Char -> Bool) -> CharSet
build Char -> Bool
isAsciiLower