Data.Word8

word8-0.1.2: 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 :: *

8-bit unsigned integer type

Instances

Bounded Word8 |
Enum Word8 |
Eq Word8 |
Integral Word8 |
Num Word8 |
Ord Word8 |
Read Word8 |
Real Word8 |
Show Word8 |
Ix Word8 |
Bits Word8 |
FiniteBits Word8 |

# Character classification

isControl :: Word8 -> Bool

isSpace :: Word8 -> Bool

isLower :: Word8 -> Bool

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

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

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

isSymbol :: Word8 -> Bool

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

isSeparator :: Word8 -> Bool

# Subranges

isAscii :: Word8 -> Bool

isLatin1 :: Word8 -> Bool

isAsciiUpper :: Word8 -> Bool

isAsciiLower :: Word8 -> Bool

# Case conversion

toUpper :: Word8 -> Word8

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

toLower :: Word8 -> Word8

toTitle :: Word8 -> Word8

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

# ASCII charactors

_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

# Some Latin-1 charactors

_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