%
-% (c) The AQUA Project, Glasgow University, 1994-1996
+% (c) The AQUA Project, Glasgow University, 1994-1999
%
\section[Char]{Module @Char@}
module Char
(
- isAscii, isLatin1, isControl,
- isPrint, isSpace, isUpper,
- isLower, isAlpha, isDigit,
- isOctDigit, isHexDigit, isAlphanum, -- :: Char -> Bool
+ Char
- toUpper, toLower, -- :: Char -> Char
+ , isAscii, isLatin1, isControl
+ , isPrint, isSpace, isUpper
+ , isLower, isAlpha, isDigit
+ , isOctDigit, isHexDigit, isAlphaNum -- :: Char -> Bool
- digitToInt, -- :: Char -> Int
- intToDigit, -- :: Int -> Char
+ , toUpper, toLower -- :: Char -> Char
- ord, -- :: Char -> Int
- chr, -- :: Int -> Char
- readLitChar, -- :: ReadS Char
- showLitChar -- :: Char -> ShowS
- ) where
-
-import PrelBase
-import PrelRead (readLitChar)
-import {-# SOURCE #-} PrelErr ( error )
-
-\end{code}
+ , digitToInt -- :: Char -> Int
+ , intToDigit -- :: Int -> Char
-\begin{code}
--- Digit conversion operations
+ , ord -- :: Char -> Int
+ , chr -- :: Int -> Char
+ , readLitChar -- :: ReadS Char
+ , showLitChar -- :: Char -> ShowS
+ , lexLitChar -- :: ReadS String
-digitToInt :: Char -> Int
-digitToInt c
- | isDigit c = fromEnum c - fromEnum '0'
- | c >= 'a' && c <= 'f' = fromEnum c - fromEnum 'a' + 10
- | c >= 'A' && c <= 'F' = fromEnum c - fromEnum 'A' + 10
- | otherwise = error "Char.digitToInt: not a digit" -- sigh
+ , String
+ -- Implementation checked wrt. Haskell 98 lib report, 1/99.
+ ) where
+import PrelBase
+import PrelShow
+import PrelEnum
+import PrelNum
+import PrelRead (readLitChar, lexLitChar, digitToInt)
+import PrelErr ( error )
\end{code}