word8-0.1.3: Word8 library

Safe Haskell | Safe
Language | Haskell2010

Data.Word8

Contents

- Re-exporting
- Character classification
- Subranges
- Case conversion
- ASCII charactors
- Some Latin-1 charactors

Description

Word8 library to be used with Data.ByteString. All function assumes that `Word8` is encoded in Latin-1 (ISO-8859-1). All utility functions are supposed to work as if those of `Char`. Exceptions are described in the function documentations.

Base library 4.7 (GHC 7.8) or earlier is based on Unicode 6. Base library 4.8 (GHC 7.10) or later is based on Unicode 7. `isLower`, `isSymbol` and `isPunctuation` behave differently.

Synopsis

- data Word8
- isControl :: Word8 -> Bool
- isSpace :: Word8 -> Bool
- isLower :: Word8 -> Bool
- isUpper :: Word8 -> Bool
- isAlpha :: Word8 -> Bool
- isAlphaNum :: Word8 -> Bool
- isPrint :: Word8 -> Bool
- isDigit :: Word8 -> Bool
- isOctDigit :: Word8 -> Bool
- isHexDigit :: Word8 -> Bool
- isLetter :: Word8 -> Bool
- isMark :: Word8 -> Bool
- isNumber :: Word8 -> Bool
- isPunctuation :: Word8 -> Bool
- isSymbol :: Word8 -> Bool
- isSeparator :: Word8 -> Bool
- isAscii :: Word8 -> Bool
- isLatin1 :: Word8 -> Bool
- isAsciiUpper :: Word8 -> Bool
- isAsciiLower :: Word8 -> Bool
- toUpper :: Word8 -> Word8
- toLower :: Word8 -> Word8
- toTitle :: Word8 -> Word8
- _nul :: Word8
- _tab :: Word8
- _lf :: Word8
- _vt :: Word8
- _np :: Word8
- _cr :: Word8
- _space :: Word8
- _exclam :: Word8
- _quotedbl :: Word8
- _numbersign :: Word8
- _dollar :: Word8
- _percent :: Word8
- _ampersand :: Word8
- _quotesingle :: Word8
- _parenleft :: Word8
- _parenright :: Word8
- _asterisk :: Word8
- _plus :: Word8
- _comma :: Word8
- _hyphen :: Word8
- _period :: Word8
- _slash :: Word8
- _0 :: Word8
- _1 :: Word8
- _2 :: Word8
- _3 :: Word8
- _4 :: Word8
- _5 :: Word8
- _6 :: Word8
- _7 :: Word8
- _8 :: Word8
- _9 :: Word8
- _colon :: Word8
- _semicolon :: Word8
- _less :: Word8
- _equal :: Word8
- _greater :: Word8
- _question :: Word8
- _at :: Word8
- _A :: Word8
- _B :: Word8
- _C :: Word8
- _D :: Word8
- _E :: Word8
- _F :: Word8
- _G :: Word8
- _H :: Word8
- _I :: Word8
- _J :: Word8
- _K :: Word8
- _L :: Word8
- _M :: Word8
- _N :: Word8
- _O :: Word8
- _P :: Word8
- _Q :: Word8
- _R :: Word8
- _S :: Word8
- _T :: Word8
- _U :: Word8
- _V :: Word8
- _W :: Word8
- _X :: Word8
- _Y :: Word8
- _Z :: Word8
- _bracketleft :: Word8
- _backslash :: Word8
- _bracketright :: Word8
- _circum :: Word8
- _underscore :: Word8
- _grave :: Word8
- _a :: Word8
- _b :: Word8
- _c :: Word8
- _d :: Word8
- _e :: Word8
- _f :: Word8
- _g :: Word8
- _h :: Word8
- _i :: Word8
- _j :: Word8
- _k :: Word8
- _l :: Word8
- _m :: Word8
- _n :: Word8
- _o :: Word8
- _p :: Word8
- _q :: Word8
- _r :: Word8
- _s :: Word8
- _t :: Word8
- _u :: Word8
- _v :: Word8
- _w :: Word8
- _x :: Word8
- _y :: Word8
- _z :: Word8
- _braceleft :: Word8
- _bar :: Word8
- _braceright :: Word8
- _tilde :: Word8
- _del :: Word8
- _nbsp :: Word8
- _ordfeminine :: Word8
- _softhyphen :: Word8
- _mu :: Word8
- _ordmasculine :: Word8
- _s2 :: Word8
- _s3 :: Word8
- _s1 :: Word8
- _1'4 :: Word8
- _1'2 :: Word8
- _3'4 :: Word8
- _Agrave :: Word8
- _Odieresis :: Word8
- _Oslash :: Word8
- _Thorn :: Word8
- _germandbls :: Word8
- _agrave :: Word8
- _odieresis :: Word8
- _oslash :: Word8
- _thorn :: Word8
- _ydieresis :: Word8

# Re-exporting

data Word8 #

#### Instances

Instances details

Bounded Word8 |
Instance details Defined in GHC.Word Methods minBound :: Word8 maxBound :: Word8
Enum Word8 |
Instance details Defined in GHC.Word Methods succ :: Word8 -> Word8 pred :: Word8 -> Word8 toEnum :: Int -> Word8 fromEnum :: Word8 -> Int enumFrom :: Word8 -> [Word8] enumFromThen :: Word8 -> Word8 -> [Word8] enumFromTo :: Word8 -> Word8 -> [Word8] enumFromThenTo :: Word8 -> Word8 -> Word8 -> [Word8]
Eq Word8 |
Instance details Defined in GHC.Word Methods (==) :: Word8 -> Word8 -> Bool (/=) :: Word8 -> Word8 -> Bool
Integral Word8 |
Instance details Defined in GHC.Word Methods quot :: Word8 -> Word8 -> Word8 rem :: Word8 -> Word8 -> Word8 div :: Word8 -> Word8 -> Word8 mod :: Word8 -> Word8 -> Word8 quotRem :: Word8 -> Word8 -> (Word8, Word8) divMod :: Word8 -> Word8 -> (Word8, Word8) toInteger :: Word8 -> Integer
Num Word8 |
Instance details Defined in GHC.Word Methods (+) :: Word8 -> Word8 -> Word8 (-) :: Word8 -> Word8 -> Word8 (*) :: Word8 -> Word8 -> Word8 negate :: Word8 -> Word8 abs :: Word8 -> Word8 signum :: Word8 -> Word8 fromInteger :: Integer -> Word8
Ord Word8 |
Instance details Defined in GHC.Word Methods compare :: Word8 -> Word8 -> Ordering (<) :: Word8 -> Word8 -> Bool (<=) :: Word8 -> Word8 -> Bool (>) :: Word8 -> Word8 -> Bool (>=) :: Word8 -> Word8 -> Bool max :: Word8 -> Word8 -> Word8 min :: Word8 -> Word8 -> Word8
Read Word8 |
Instance details Defined in GHC.Read Methods readsPrec :: Int -> ReadS Word8 readList :: ReadS [Word8] readPrec :: ReadPrec Word8 readListPrec :: ReadPrec [Word8]
Real Word8 |
Instance details Defined in GHC.Word Methods toRational :: Word8 -> Rational
Show Word8 |
Instance details Defined in GHC.Word Methods showsPrec :: Int -> Word8 -> ShowS show :: Word8 -> String showList :: [Word8] -> ShowS
Ix Word8 |
Instance details Defined in GHC.Word Methods range :: (Word8, Word8) -> [Word8] index :: (Word8, Word8) -> Word8 -> Int unsafeIndex :: (Word8, Word8) -> Word8 -> Int inRange :: (Word8, Word8) -> Word8 -> Bool rangeSize :: (Word8, Word8) -> Int unsafeRangeSize :: (Word8, Word8) -> Int
Bits Word8 |

Instance details

Defined in GHC.Word

Methods

(.&.) :: Word8 -> Word8 -> Word8

(.|.) :: Word8 -> Word8 -> Word8

xor :: Word8 -> Word8 -> Word8

complement :: Word8 -> Word8

shift :: Word8 -> Int -> Word8

rotate :: Word8 -> Int -> Word8

zeroBits :: Word8

bit :: Int -> Word8

setBit :: Word8 -> Int -> Word8

clearBit :: Word8 -> Int -> Word8

complementBit :: Word8 -> Int -> Word8

testBit :: Word8 -> Int -> Bool

bitSizeMaybe :: Word8 -> Maybe Int

bitSize :: Word8 -> Int

isSigned :: Word8 -> Bool

shiftL :: Word8 -> Int -> Word8

unsafeShiftL :: Word8 -> Int -> Word8

shiftR :: Word8 -> Int -> Word8

unsafeShiftR :: Word8 -> Int -> Word8

rotateL :: Word8 -> Int -> Word8

rotateR :: Word8 -> Int -> Word8

popCount :: Word8 -> Int

FiniteBits Word8 |
Instance details Defined in GHC.Word Methods finiteBitSize :: Word8 -> Int countLeadingZeros :: Word8 -> Int countTrailingZeros :: Word8 -> Int

# Character classification

isControl :: Word8 -> Bool Source #

isSpace :: Word8 -> Bool Source #

isLower :: Word8 -> Bool Source #

This function returns `True` for 170 and 186 in Unicode 6. But it returns `False` in Unicode 7.

isUpper :: Word8 -> Bool Source #

isAlpha :: Word8 -> Bool Source #

isAlphaNum :: Word8 -> Bool Source #

isPrint :: Word8 -> Bool Source #

isDigit :: Word8 -> Bool Source #

isOctDigit :: Word8 -> Bool Source #

isHexDigit :: Word8 -> Bool Source #

isLetter :: Word8 -> Bool Source #

isMark :: Word8 -> Bool Source #

isNumber :: Word8 -> Bool Source #

isPunctuation :: Word8 -> Bool Source #

This function returns `False` for 167 and 182 in Unicode 6. But it returns `True` in Unicode 7.

isSymbol :: Word8 -> Bool Source #

This function returns `True` for 167 and 182 in Unicode 6. But it returns `False` in Unicode 7.

isSeparator :: Word8 -> Bool Source #

# Subranges

isAscii :: Word8 -> Bool Source #

isLatin1 :: Word8 -> Bool Source #

isAsciiUpper :: Word8 -> Bool Source #

isAsciiLower :: Word8 -> Bool Source #

# Case conversion

toUpper :: Word8 -> Word8 Source #

Micro sign/mu (0xb5) and small letter Y with diaeresis (0xff) remain the same.

toLower :: Word8 -> Word8 Source #

toTitle :: Word8 -> Word8 Source #

Micro sign/mu (0xb5) and small letter Y with diaeresis (0xff) remain the same.

# ASCII charactors

_nul :: Word8 Source #

_tab :: Word8 Source #

_lf :: Word8 Source #

_vt :: Word8 Source #

_np :: Word8 Source #

_cr :: Word8 Source #

_space :: Word8 Source #

_exclam :: Word8 Source #

_quotedbl :: Word8 Source #

_numbersign :: Word8 Source #

_dollar :: Word8 Source #

_percent :: Word8 Source #

_ampersand :: Word8 Source #

_quotesingle :: Word8 Source #

_parenleft :: Word8 Source #

_parenright :: Word8 Source #

_asterisk :: Word8 Source #

_plus :: Word8 Source #

_comma :: Word8 Source #

_hyphen :: Word8 Source #

_period :: Word8 Source #

_slash :: Word8 Source #

_0 :: Word8 Source #

_1 :: Word8 Source #

_2 :: Word8 Source #

_3 :: Word8 Source #

_4 :: Word8 Source #

_5 :: Word8 Source #

_6 :: Word8 Source #

_7 :: Word8 Source #

_8 :: Word8 Source #

_9 :: Word8 Source #

_colon :: Word8 Source #

_semicolon :: Word8 Source #

_less :: Word8 Source #

_equal :: Word8 Source #

_greater :: Word8 Source #

_question :: Word8 Source #

_at :: Word8 Source #

_A :: Word8 Source #

_B :: Word8 Source #

_C :: Word8 Source #

_D :: Word8 Source #

_E :: Word8 Source #

_F :: Word8 Source #

_G :: Word8 Source #

_H :: Word8 Source #

_I :: Word8 Source #

_J :: Word8 Source #

_K :: Word8 Source #

_L :: Word8 Source #

_M :: Word8 Source #

_N :: Word8 Source #

_O :: Word8 Source #

_P :: Word8 Source #

_Q :: Word8 Source #

_R :: Word8 Source #

_S :: Word8 Source #

_T :: Word8 Source #

_U :: Word8 Source #

_V :: Word8 Source #

_W :: Word8 Source #

_X :: Word8 Source #

_Y :: Word8 Source #

_Z :: Word8 Source #

_bracketleft :: Word8 Source #

_backslash :: Word8 Source #

_bracketright :: Word8 Source #

_circum :: Word8 Source #

_underscore :: Word8 Source #

_grave :: Word8 Source #

_a :: Word8 Source #

_b :: Word8 Source #

_c :: Word8 Source #

_d :: Word8 Source #

_e :: Word8 Source #

_f :: Word8 Source #

_g :: Word8 Source #

_h :: Word8 Source #

_i :: Word8 Source #

_j :: Word8 Source #

_k :: Word8 Source #

_l :: Word8 Source #

_m :: Word8 Source #

_n :: Word8 Source #

_o :: Word8 Source #

_p :: Word8 Source #

_q :: Word8 Source #

_r :: Word8 Source #

_s :: Word8 Source #

_t :: Word8 Source #

_u :: Word8 Source #

_v :: Word8 Source #

_w :: Word8 Source #

_x :: Word8 Source #

_y :: Word8 Source #

_z :: Word8 Source #

_braceleft :: Word8 Source #

_bar :: Word8 Source #

_braceright :: Word8 Source #

_tilde :: Word8 Source #

_del :: Word8 Source #

# Some Latin-1 charactors

_nbsp :: Word8 Source #

_ordfeminine :: Word8 Source #

_softhyphen :: Word8 Source #

_mu :: Word8 Source #

_ordmasculine :: Word8 Source #

_s2 :: Word8 Source #

_s3 :: Word8 Source #

_s1 :: Word8 Source #

_1'4 :: Word8 Source #

_1'2 :: Word8 Source #

_3'4 :: Word8 Source #

_Agrave :: Word8 Source #

_Odieresis :: Word8 Source #

_Oslash :: Word8 Source #

_Thorn :: Word8 Source #

_germandbls :: Word8 Source #

_agrave :: Word8 Source #

_odieresis :: Word8 Source #

_oslash :: Word8 Source #

_thorn :: Word8 Source #

_ydieresis :: Word8 Source #