Make chr check for the correct range
commit52dd3090ed7806cf65741f73b0852bb3190802cb
authorMelvar Chen <Melvar.Chen@googlemail.com>
dateWed 9 Sep 2015, 03:29 (11 years ago)
parentc6acf7f
libs/prelude/Prelude/Chars.idr+1−1
@@ -9,7 +9,7 @@ import Builtins
99
1010||| Return the ASCII representation of the character.
1111chr : Int -> Char
12−chr x = if (x >= 0 && x < 0x11000)
12+chr x = if (x >= 0 && x < 0x110000)
1313 then assert_total (prim__intToChar x)
1414 else '\0'
1515