[project @ 2003-09-16 13:03:37 by simonmar]
authorsimonmar <unknown>
Tue, 16 Sep 2003 13:03:37 +0000 (13:03 +0000)
committersimonmar <unknown>
Tue, 16 Sep 2003 13:03:37 +0000 (13:03 +0000)
Legacy Removal
~~~~~~~~~~~~~~

The following features have been consigned to the bit bucket:

  _ccall_
  _casm_
  ``....''  (lit-lits)
  the CCallable class
  the CReturnable class

GHC/Base.lhs
GHC/Float.lhs
GHC/Int.hs
GHC/Ptr.lhs
GHC/Stable.lhs
GHC/Word.hs

index 988c94e..92df297 100644 (file)
@@ -16,8 +16,6 @@ GHC.Prim              Has no implementation.  It defines built-in things, and
                The source file is GHC.Prim.hi-boot, which is just
                copied to make GHC.Prim.hi
 
-               Classes: CCallable, CReturnable
-
 GHC.Base       Classes: Eq, Ord, Functor, Monad
                Types:   list, (), Int, Bool, Ordering, Char, String
 
@@ -687,25 +685,6 @@ asTypeOf           =  const
 
 %*********************************************************
 %*                                                     *
-\subsection{CCallable instances}
-%*                                                     *
-%*********************************************************
-
-Defined here to avoid orphans
-
-\begin{code}
-instance CCallable Char
-instance CReturnable Char
-
-instance CCallable   Int
-instance CReturnable Int
-
-instance CReturnable () -- Why, exactly?
-\end{code}
-
-
-%*********************************************************
-%*                                                     *
 \subsection{Generics}
 %*                                                     *
 %*********************************************************
index 71a0e2e..72fc544 100644 (file)
@@ -103,12 +103,6 @@ data Float = F# Float#
 
 -- | Double-precision floating point numbers.
 data Double    = D# Double#
-
-instance CCallable   Float
-instance CReturnable Float
-
-instance CCallable   Double
-instance CReturnable Double
 \end{code}
 
 
index 025ebdb..e3d045d 100644 (file)
@@ -41,9 +41,6 @@ import GHC.Show
 data Int8 = I8# Int# deriving (Eq, Ord)
 -- ^ 8-bit signed integer type
 
-instance CCallable Int8
-instance CReturnable Int8
-
 instance Show Int8 where
     showsPrec p x = showsPrec p (fromIntegral x :: Int)
 
@@ -150,9 +147,6 @@ instance Bits Int8 where
 data Int16 = I16# Int# deriving (Eq, Ord)
 -- ^ 16-bit signed integer type
 
-instance CCallable Int16
-instance CReturnable Int16
-
 instance Show Int16 where
     showsPrec p x = showsPrec p (fromIntegral x :: Int)
 
@@ -505,9 +499,6 @@ instance Bits Int32 where
 
 #endif 
 
-instance CCallable Int32
-instance CReturnable Int32
-
 instance Real Int32 where
     toRational x = toInteger x % 1
 
@@ -779,9 +770,6 @@ instance Bits Int64 where
 
 #endif
 
-instance CCallable Int64
-instance CReturnable Int64
-
 instance Real Int64 where
     toRational x = toInteger x % 1
 
index 39d842d..7f43745 100644 (file)
@@ -60,9 +60,6 @@ alignPtr addr@(Ptr a) (I# i)
 minusPtr :: Ptr a -> Ptr b -> Int
 minusPtr (Ptr a1) (Ptr a2) = I# (minusAddr# a1 a2)
 
-instance CCallable   (Ptr a)
-instance CReturnable (Ptr a)
-
 ------------------------------------------------------------------------
 -- Function pointers for the default calling convention.
 
@@ -93,9 +90,5 @@ castFunPtrToPtr (FunPtr addr) = Ptr addr
 -- |Casts a 'Ptr' to a 'FunPtr'
 castPtrToFunPtr :: Ptr a -> FunPtr b
 castPtrToFunPtr (Ptr addr) = FunPtr addr
-
-instance CCallable   (FunPtr a)
-instance CReturnable (FunPtr a)
-
 \end{code}
 
index 80af1f2..9a55a68 100644 (file)
@@ -32,9 +32,6 @@ import GHC.IOBase
 
 data StablePtr a = StablePtr (StablePtr# a)
 
-instance CCallable   (StablePtr a)
-instance CReturnable (StablePtr a)
-
 newStablePtr   :: a -> IO (StablePtr a)
 newStablePtr a = IO $ \ s ->
     case makeStablePtr# a s of (# s', sp #) -> (# s', StablePtr sp #)
index 2332c13..5a13fd0 100644 (file)
@@ -69,9 +69,6 @@ predError inst_ty =
 -- |A 'Word' is an unsigned integral type, with the same size as 'Int'.
 data Word = W# Word# deriving (Eq, Ord)
 
-instance CCallable Word
-instance CReturnable Word
-
 instance Show Word where
     showsPrec p x = showsPrec p (toInteger x)
 
@@ -185,9 +182,6 @@ instance Bits Word where
 data Word8 = W8# Word# deriving (Eq, Ord)
 -- ^ 8-bit unsigned integer type
 
-instance CCallable Word8
-instance CReturnable Word8
-
 instance Show Word8 where
     showsPrec p x = showsPrec p (fromIntegral x :: Int)
 
@@ -288,9 +282,6 @@ instance Bits Word8 where
 data Word16 = W16# Word# deriving (Eq, Ord)
 -- ^ 16-bit unsigned integer type
 
-instance CCallable Word16
-instance CReturnable Word16
-
 instance Show Word16 where
     showsPrec p x = showsPrec p (fromIntegral x :: Int)
 
@@ -611,9 +602,6 @@ instance Bits Word32 where
 
 #endif
 
-instance CCallable Word32
-instance CReturnable Word32
-
 instance Show Word32 where
 #if WORD_SIZE_IN_BITS < 33
     showsPrec p x = showsPrec p (toInteger x)
@@ -868,9 +856,6 @@ instance Bits Word64 where
 
 #endif
 
-instance CCallable Word64
-instance CReturnable Word64
-
 instance Show Word64 where
     showsPrec p x = showsPrec p (toInteger x)