haskell98-1.1.0.1: Compatibility with Haskell 98

Char

Synopsis

Documentation

digitToInt :: Char -> IntSource

Convert a single digit Char to the corresponding Int. This function fails unless its argument satisfies isHexDigit, but recognises both upper and lower-case hexadecimal digits (i.e. '0'..'9', 'a'..'f', 'A'..'F').

intToDigit :: Int -> CharSource

Convert an Int in the range 0..15 to the corresponding single digit Char. This function fails on other inputs, and generates lower-case hexadecimal digits.

ord :: Char -> IntSource

The Prelude.fromEnum method restricted to the type Data.Char.Char.

chr :: Int -> CharSource

The Prelude.toEnum method restricted to the type Data.Char.Char.

readLitChar :: ReadS CharSource

Read a string representation of a character, using Haskell source-language escape conventions, and convert it to the character that it encodes. For example:

 readLitChar "\\nHello"  =  [('\n', "Hello")]

showLitChar :: Char -> ShowSSource

Convert a character to a string using only printable characters, using Haskell source-language escape conventions. For example:

 showLitChar '\n' s  =  "\\n" ++ s

lexLitChar :: ReadS StringSource

Read a string representation of a character, using Haskell source-language escape conventions. For example:

 lexLitChar  "\\nHello"  =  [("\\n", "Hello")]

Char

type String = [Char]Source

A String is a list of characters. String constants in Haskell are values of type String.