Move the Char datatype into ghc-prim
[ghc-base.git] / GHC / Base.lhs
index 341a630..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
@@ -99,7 +101,7 @@ import GHC.Prim
 import {-# SOURCE #-} GHC.Err
 
 infixr 9  .
-infixr 5  ++, :
+infixr 5  ++
 infix  4  ==, /=, <, <=, >=, >
 infixr 3  &&
 infixr 2  ||
@@ -274,9 +276,8 @@ class  Monad m  where
 %*********************************************************
 
 \begin{code}
-data [] a = [] | a : [a]  -- do explicitly: deriving (Eq, Ord)
-                          -- to avoid weird names like con2tag_[]#
-
+-- do explicitly: deriving (Eq, Ord)
+-- to avoid weird names like con2tag_[]#
 
 instance (Eq a) => Eq [a] where
     {-# SPECIALISE instance Eq [Char] #-}
@@ -574,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
@@ -618,7 +618,7 @@ String equality is used when desugaring pattern-matches against strings.
 eqString :: String -> String -> Bool
 eqString []       []       = True
 eqString (c1:cs1) (c2:cs2) = c1 == c2 && cs1 `eqString` cs2
-eqString cs1      cs2      = False
+eqString _        _        = False
 
 {-# RULES "eqString" (==) = eqString #-}
 -- eqString also has a BuiltInRule in PrelRules.lhs:
@@ -728,7 +728,7 @@ inline x = x
 --      but from Template Haskell onwards it's simply
 --      defined here in Base.lhs
 assert :: Bool -> a -> a
-assert pred r = r
+assert _pred r = r
 
 breakpoint :: a -> a
 breakpoint r = r