Changeset 6793 for src/Unicode.hs
- Timestamp:
- 09/06/05 14:11:41 (3 years ago)
- Files:
-
- 1 modified
-
src/Unicode.hs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Unicode.hs
r3372 r6793 44 44 import GHC.Base 45 45 import GHC.Real (fromIntegral) 46 import GHC.Num (fromInteger)46 import GHC.Num (fromInteger) 47 47 import GHC.Read 48 48 import GHC.Show … … 147 147 -- corresponding to the ASCII character set. 148 148 isAscii :: Char -> Bool 149 isAscii c = c < '\x80'149 isAscii c = c < '\x80' 150 150 151 151 -- | Selects the first 256 characters of the Unicode character set, … … 172 172 -- Done with explicit equalities both for efficiency, and to avoid a tiresome 173 173 -- recursion with GHC.List elem 174 isSpace c = c == ' '||175 c == '\t'||176 c == '\n'||177 c == '\r'||178 c == '\f'||179 c == '\v'||180 c == '\xa0' ||181 iswspace (fromIntegral (ord c)) /= 0174 isSpace c = c == ' ' || 175 c == '\t' || 176 c == '\n' || 177 c == '\r' || 178 c == '\f' || 179 c == '\v' || 180 c == '\xa0' || 181 iswspace (fromIntegral (ord c)) /= 0 182 182 183 183 -- | Selects alphabetic Unicode characters (letters) that are not lower-case. … … 204 204 -- | Selects ASCII octal digits, i.e. @\'0\'@..@\'7\'@. 205 205 isOctDigit :: Char -> Bool 206 isOctDigit c = c >= '0' && c <= '7'206 isOctDigit c = c >= '0' && c <= '7' 207 207 208 208 -- | Selects ASCII hexadecimal digits, 209 209 -- i.e. @\'0\'@..@\'9\'@, @\'a\'@..@\'f\'@, @\'A\'@..@\'F\'@. 210 210 isHexDigit :: Char -> Bool 211 isHexDigit c = isDigit c || c >= 'A' && c <= 'F' ||211 isHexDigit c = isDigit c || c >= 'A' && c <= 'F' || 212 212 c >= 'a' && c <= 'f' 213 213
