Move the Char datatype into ghc-prim
authorIan Lynagh <igloo@earth.li>
Tue, 5 Aug 2008 20:40:09 +0000 (20:40 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 5 Aug 2008 20:40:09 +0000 (20:40 +0000)
GHC/Base.lhs
GHC/Err.lhs

index 6c9333b..b18215b 100644 (file)
@@ -87,11 +87,13 @@ module GHC.Base
         module GHC.Bool,
         module GHC.Generics,
         module GHC.Ordering,
+        module GHC.Types,
         module GHC.Prim,        -- Re-export GHC.Prim and GHC.Err, to avoid lots
         module GHC.Err          -- of people having to import it explicitly
   ) 
         where
 
+import GHC.Types
 import GHC.Bool
 import GHC.Generics
 import GHC.Ordering
@@ -573,7 +575,6 @@ To convert a 'Char' to or from the corresponding 'Int' value defined
 by Unicode, use 'Prelude.toEnum' and 'Prelude.fromEnum' from the
 'Prelude.Enum' class respectively (or equivalently 'ord' and 'chr').
 -}
-data Char = C# Char#
 
 -- We don't use deriving for Eq and Ord, because for Ord the derived
 -- instance defines only compare, which takes two primops.  Then
index 03ec56e..8c02f85 100644 (file)
@@ -33,7 +33,7 @@ module GHC.Err
        ) where
 
 #ifndef __HADDOCK__
-import GHC.Base
+import GHC.Types
 import GHC.IOBase
 import GHC.Exception
 #endif
@@ -47,7 +47,7 @@ import GHC.Exception
 
 \begin{code}
 -- | 'error' stops execution and displays an error message.
-error :: String -> a
+error :: [Char] -> a
 error s = throw (ErrorCall s)
 
 -- | A special case of 'error'.