Add Haddock `/Since: 4.7.0.0/` comments to new symbols
[packages/base.git] / GHC / Char.hs
1
2 {-# LANGUAGE NoImplicitPrelude, MagicHash #-}
3
4 module GHC.Char (chr) where
5
6 import GHC.Base
7 import GHC.Show
8
9 -- | The 'Prelude.toEnum' method restricted to the type 'Data.Char.Char'.
10 chr :: Int -> Char
11 chr i@(I# i#)
12 | isTrue# (int2Word# i# `leWord#` 0x10FFFF##) = C# (chr# i#)
13 | otherwise
14 = error ("Prelude.chr: bad argument: " ++ showSignedInt (I# 9#) i "")
15