on master help sign in
Updated Unicode Char documentation
commit2a682446da6f437349817c062a46135e147a899f authorKyarigwo <bwielinga@iprimus.com.au> dateSun 5 Feb 2017, 10:14 (10 years ago) parent865343d
1 file changed+7−2
libs/prelude/Prelude/Chars.idr+7−2
libs/prelude/Prelude/Chars.idr+7−2
@@ -1,3 +1,8 @@
1+||| Functions operating over Chars.
2+|||
3+||| The representation of a Char is backend dependent,
4+||| for the C backend, it is a Unicode code point.
5+|||
16module Prelude.Chars
27-- Functions operating over Chars
38
@@ -9,7 +14,7 @@ import Builtins
914
1015%access public export
1116
12−||| Convert the number to its Unicode equivalent.
17+||| Convert the number to its backend dependent (usually Unicode) Char equivelent.
1318chr : Int -> Char
1419chr x = if (x >= 0 && x < 0x110000)
1520 then assert_total (prim__intToChar x)
@@ -18,7 +23,7 @@ chr x = if (x >= 0 && x < 0x110000)
1823Cast Int Char where
1924 cast = chr
2025
21−||| Return the Unicode representation of the character.
26+||| Return the backend dependent (usually Unicode) numerical equivelent of the Char.
2227ord : Char -> Int
2328ord x = prim__charToInt x
2429