6 , primUnicodeIsAlphaNum
13 -- based on GHC's implementation
14 primUnicodeIsPrint c = not (isControl c)
15 -- The upper case ISO characters have the multiplication sign dumped
16 -- randomly in the middle of the range. Go figure.
17 primUnicodeIsUpper c = c >= 'A' && c <= 'Z' ||
18 c >= '\xC0' && c <= '\xD6' ||
19 c >= '\xD8' && c <= '\xDE'
20 -- The lower case ISO characters have the division sign dumped
21 -- randomly in the middle of the range. Go figure.
22 primUnicodeIsLower c = c >= 'a' && c <= 'z' ||
23 c >= '\xDF' && c <= '\xF6' ||
24 c >= '\xF8' && c <= '\xFF'
25 primUnicodeIsAlphaNum c = isAlpha c || isDigit c
27 | isLower c = toEnum (fromEnum c - fromEnum 'a' + fromEnum 'A')
30 | isUpper c = toEnum (fromEnum c - fromEnum 'A' + fromEnum 'a')