[project @ 2001-08-04 06:19:54 by ken]
[ghc-hetmet.git] / ghc / lib / std / Char.lhs
index a471bec..1fbc390 100644 (file)
@@ -1,7 +1,8 @@
+% -----------------------------------------------------------------------------
+% $Id: Char.lhs,v 1.8 2000/12/11 17:51:34 simonmar Exp $
 %
-% (c) The AQUA Project, Glasgow University, 1994-1999
+% (c) The University of Glasgow, 1994-2000
 %
-
 \section[Char]{Module @Char@}
 
 \begin{code}
@@ -32,21 +33,11 @@ module Char
      -- Implementation checked wrt. Haskell 98 lib report, 1/99.
     ) where
 
+#ifndef __HUGS__
 import PrelBase
-import PrelRead (readLitChar, lexLitChar)
-import {-# SOURCE #-} PrelErr   ( error )
-
-\end{code}
-
-\begin{code}
--- Digit conversion operations
-
-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 " ++ show c) -- sigh
-
-
+import PrelShow
+import PrelRead (readLitChar, lexLitChar, digitToInt)
+#else
+isLatin1 c = True
+#endif
 \end{code}