From d6727acd2361c3c96a24fbaabde4419328446193 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 5 Aug 2008 20:40:09 +0000 Subject: [PATCH] Move the Char datatype into ghc-prim --- GHC/Base.lhs | 3 ++- GHC/Err.lhs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/GHC/Base.lhs b/GHC/Base.lhs index 6c9333b..b18215b 100644 --- a/GHC/Base.lhs +++ b/GHC/Base.lhs @@ -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 diff --git a/GHC/Err.lhs b/GHC/Err.lhs index 03ec56e..8c02f85 100644 --- a/GHC/Err.lhs +++ b/GHC/Err.lhs @@ -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'. -- 1.7.10.4