Char +base
The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) characters (see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 charachers), which is itself an extension of the ASCII character set (the first 128 characters). A character literal in Haskell has type Char.
To convert a Char to or from the corresponding Int value defined by Unicode, use Prelude.toEnum and Prelude.fromEnum from the Prelude.Enum class respectively (or equivalently ord and chr).
Character literal
Parses and returns the specified character.
Determines whether a character can be accurately encoded in a CString. Unrepresentable characters are converted to '?'.
Currently only Latin-1 characters are representable.
The Char type and associated operations.
Read a character from the standard input device (same as hGetChar stdin).
Write a character to the standard output device (same as hPutChar stdout).
utility function converting a Char to a show function that simply prepends the character unchanged.
Convert a C byte, representing a Latin-1 character, to the corresponding Haskell character.
Convert a Haskell character to a C character. This function is only safe on the first 256 characters.
Convert a Haskell character to a C signed char. This function is only safe on the first 256 characters.
Convert a Haskell character to a C unsigned char. This function is only safe on the first 256 characters.
Convert a C signed char, representing a Latin-1 character, to the corresponding Haskell character.
Convert a C unsigned char, representing a Latin-1 character, to the corresponding Haskell character.
Haskell type representing the C char type.
Haskell type representing the C signed char type.
Haskell type representing the C unsigned char type.
Haskell type representing the C wchar_t type.
Computation hGetChar hdl reads a character from the file or channel managed by hdl, blocking until a character is available.
This operation may fail with:
* isEOFError if the end of file has been reached.
Computation hPutChar hdl ch writes the character ch to the file or channel managed by hdl. Characters may be buffered if buffering is enabled for hdl.
This operation may fail with:
* isFullError if the device is full; or
* isPermissionError if another system resource limit would be exceeded.
Read a string representation of a character, using Haskell source-language escape conventions. For example:
> lexLitChar "\\nHello" = [("\\n", "Hello")]
Makes a constructor for Char.
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")]
Convert a character to a string using only printable characters, using Haskell source-language escape conventions. For example:
> showLitChar '\n' s = "\\n" ++ s
Show more results