[project @ 2003-09-16 13:03:37 by simonmar]
[ghc-hetmet.git] / ghc / compiler / prelude / ForeignCall.lhs
index 0197d64..ab04abf 100644 (file)
@@ -12,13 +12,11 @@ module ForeignCall (
 
        CExportSpec(..),
        CCallSpec(..), 
-       CCallTarget(..), isDynamicTarget, isCasmTarget,
+       CCallTarget(..), isDynamicTarget,
        CCallConv(..), defaultCCallConv, ccallConvToInt, ccallConvAttribute,
 
        DNCallSpec(..), DNKind(..), DNType(..),
-       withDNTypes,
-
-       okToExposeFCall
+       withDNTypes
     ) where
 
 #include "HsVersions.h"
@@ -110,16 +108,12 @@ The call target:
 data CCallTarget
   = StaticTarget  CLabelString  -- An "unboxed" ccall# to `fn'.
   | DynamicTarget              -- First argument (an Addr#) is the function pointer
-  | CasmTarget    CLabelString -- Inline C code (now seriously deprecated)
   deriving( Eq )
   {-! derive: Binary !-}
 
-isDynamicTarget, isCasmTarget :: CCallTarget -> Bool
+isDynamicTarget :: CCallTarget -> Bool
 isDynamicTarget DynamicTarget = True
 isDynamicTarget other        = False
-
-isCasmTarget (CasmTarget _) = True
-isCasmTarget other         = False
 \end{code}
 
 
@@ -178,7 +172,6 @@ instance Outputable CCallSpec where
 
       ppr_fun DynamicTarget     = text "__dyn_ccall" <> gc_suf <+> text "\"\""
       ppr_fun (StaticTarget fn) = text "__ccall"     <> gc_suf <+> pprCLabelString fn
-      ppr_fun (CasmTarget   fn) = text "__casm"      <> gc_suf <+> text "``" <> pprCLabelString fn <> text "''"
 \end{code}
 
 
@@ -251,13 +244,6 @@ instance Outputable DNCallSpec where
 %************************************************************************
 
 \begin{code}
-okToExposeFCall :: ForeignCall -> Bool
--- OK to unfold a Foreign Call in an interface file
--- Yes, unless it's a _casm_
-okToExposeFCall (CCall (CCallSpec target _ _)) = not (isCasmTarget target)
-okToExposeFCall other                                 = True
-\end{code}
-\begin{code}
 {-* Generated by DrIFT-v1.0 : Look, but Don't Touch. *-}
 instance Binary ForeignCall where
     put_ bh (CCall aa) = do
@@ -313,17 +299,12 @@ instance Binary CCallTarget where
            put_ bh aa
     put_ bh DynamicTarget = do
            putByte bh 1
-    put_ bh (CasmTarget ab) = do
-           putByte bh 2
-           put_ bh ab
     get bh = do
            h <- getByte bh
            case h of
              0 -> do aa <- get bh
                      return (StaticTarget aa)
-             1 -> do return DynamicTarget
-             _ -> do ab <- get bh
-                     return (CasmTarget ab)
+             _ -> do return DynamicTarget
 
 instance Binary CCallConv where
     put_ bh CCallConv = do