word8-0.1.3: Word8 library

Safe Haskell | Safe-Inferred
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 Source #

8-bit unsigned integer type

#### Instances

Instances details

PrintfArg Word8 | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Word8 -> FieldFormatter Source # parseFormat :: Word8 -> ModifierParser Source #
Bits Word8 | Since: base-2.1

Instance details

Defined in GHC.Internal.Word

Methods

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

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

xor :: Word8 -> Word8 -> Word8 Source #

complement :: Word8 -> Word8 Source #

shift :: Word8 -> Int -> Word8 Source #

rotate :: Word8 -> Int -> Word8 Source #

zeroBits :: Word8 Source #

bit :: Int -> Word8 Source #

setBit :: Word8 -> Int -> Word8 Source #

clearBit :: Word8 -> Int -> Word8 Source #

complementBit :: Word8 -> Int -> Word8 Source #

testBit :: Word8 -> Int -> Bool Source #

bitSizeMaybe :: Word8 -> Maybe Int Source #

bitSize :: Word8 -> Int Source #

isSigned :: Word8 -> Bool Source #

shiftL :: Word8 -> Int -> Word8 Source #

unsafeShiftL :: Word8 -> Int -> Word8 Source #

shiftR :: Word8 -> Int -> Word8 Source #

unsafeShiftR :: Word8 -> Int -> Word8 Source #

rotateL :: Word8 -> Int -> Word8 Source #

rotateR :: Word8 -> Int -> Word8 Source #

popCount :: Word8 -> Int Source #

FiniteBits Word8 | Since: base-4.6.0.0
Instance details Defined in GHC.Internal.Word Methods finiteBitSize :: Word8 -> Int Source # countLeadingZeros :: Word8 -> Int Source # countTrailingZeros :: Word8 -> Int Source #
Bounded Word8 | Since: base-2.1
Instance details Defined in GHC.Internal.Word Methods minBound :: Word8 Source # maxBound :: Word8 Source #
Enum Word8 | Since: base-2.1
Instance details Defined in GHC.Internal.Word Methods succ :: Word8 -> Word8 Source # pred :: Word8 -> Word8 Source # toEnum :: Int -> Word8 Source # fromEnum :: Word8 -> Int Source # enumFrom :: Word8 -> [Word8] Source # enumFromThen :: Word8 -> Word8 -> [Word8] Source # enumFromTo :: Word8 -> Word8 -> [Word8] Source # enumFromThenTo :: Word8 -> Word8 -> Word8 -> [Word8] Source #
Ix Word8 | Since: base-2.1
Instance details Defined in GHC.Internal.Word Methods range :: (Word8, Word8) -> [Word8] Source # index :: (Word8, Word8) -> Word8 -> Int Source # unsafeIndex :: (Word8, Word8) -> Word8 -> Int Source # inRange :: (Word8, Word8) -> Word8 -> Bool Source # rangeSize :: (Word8, Word8) -> Int Source # unsafeRangeSize :: (Word8, Word8) -> Int Source #
Num Word8 | Since: base-2.1
Instance details Defined in GHC.Internal.Word Methods (+) :: Word8 -> Word8 -> Word8 Source # (-) :: Word8 -> Word8 -> Word8 Source # (*) :: Word8 -> Word8 -> Word8 Source # negate :: Word8 -> Word8 Source # abs :: Word8 -> Word8 Source # signum :: Word8 -> Word8 Source # fromInteger :: Integer -> Word8 Source #
Integral Word8 | Since: base-2.1
Instance details Defined in GHC.Internal.Word Methods quot :: Word8 -> Word8 -> Word8 Source # rem :: Word8 -> Word8 -> Word8 Source # div :: Word8 -> Word8 -> Word8 Source # mod :: Word8 -> Word8 -> Word8 Source # quotRem :: Word8 -> Word8 -> (Word8, Word8) Source # divMod :: Word8 -> Word8 -> (Word8, Word8) Source # toInteger :: Word8 -> Integer Source #
Real Word8 | Since: base-2.1
Instance details Defined in GHC.Internal.Word Methods toRational :: Word8 -> Rational Source #
Show Word8 | Since: base-2.1
Instance details Defined in GHC.Internal.Word Methods showsPrec :: Int -> Word8 -> ShowS Source # show :: Word8 -> String Source # showList :: [Word8] -> ShowS Source #
Eq Word8 | Since: base-2.1
Instance details Defined in GHC.Internal.Word Methods (==) :: Word8 -> Word8 -> Bool Source # (/=) :: Word8 -> Word8 -> Bool Source #
Ord Word8 | Since: base-2.1
Instance details Defined in GHC.Internal.Word Methods compare :: Word8 -> Word8 -> Ordering Source # (<) :: Word8 -> Word8 -> Bool Source # (<=) :: Word8 -> Word8 -> Bool Source # (>) :: Word8 -> Word8 -> Bool Source # (>=) :: Word8 -> Word8 -> Bool Source # max :: Word8 -> Word8 -> Word8 Source # min :: Word8 -> Word8 -> Word8 Source #

# 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 #