| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Unwitch.Convert.Char
Contents
Description
Conversions from Char.
Conversions
fromInt :: Int -> Maybe Char Source #
Converts an Int to a Char if it is a valid Unicode codepoint. Valid range: 0..0xD7FF and 0xE000..0x10FFFF (excludes surrogates).
fromWord :: Word -> Maybe Char Source #
Converts a Word to a Char if it is a valid Unicode codepoint. Valid range: 0..0xD7FF and 0xE000..0x10FFFF (excludes surrogates).
Unboxed conversions
These use GHC unboxed types and unboxed sums for zero-allocation
failure handling. Requires the MagicHash, UnboxedSums and
UnboxedTuples language extensions.
See the GHC manual on unboxed types.