Merging in the new codegen branch
[ghc-hetmet.git] / compiler / prelude / ForeignCall.lhs
index e97a241..27f5b4f 100644 (file)
@@ -24,9 +24,7 @@ module ForeignCall (
        withDNTypes
     ) where
 
-#include "HsVersions.h"
-
-import FastString      ( FastString, unpackFS )
+import FastString
 import Char            ( isAlphaNum )
 import Binary
 import Outputable
@@ -72,9 +70,9 @@ data Safety
   {-! derive: Binary !-}
 
 instance Outputable Safety where
-  ppr (PlaySafe False) = ptext SLIT("safe")
-  ppr (PlaySafe True)  = ptext SLIT("threadsafe")
-  ppr PlayRisky = ptext SLIT("unsafe")
+  ppr (PlaySafe False) = ptext (sLit "safe")
+  ppr (PlaySafe True)  = ptext (sLit "threadsafe")
+  ppr PlayRisky = ptext (sLit "unsafe")
 
 playSafe :: Safety -> Bool
 playSafe PlaySafe{} = True
@@ -118,7 +116,7 @@ data CCallTarget
 
 isDynamicTarget :: CCallTarget -> Bool
 isDynamicTarget DynamicTarget = True
-isDynamicTarget other        = False
+isDynamicTarget _             = False
 \end{code}
 
 
@@ -133,6 +131,8 @@ stdcall:    Caller allocates parameters, callee deallocates.
 ToDo: The stdcall calling convention is x86 (win32) specific,
 so perhaps we should emit a warning if it's being used on other
 platforms.
+See: http://www.programmersheaven.com/2/Calling-conventions
 
 \begin{code}
 data CCallConv = CCallConv | StdCallConv | CmmCallConv
@@ -140,9 +140,9 @@ data CCallConv = CCallConv | StdCallConv | CmmCallConv
   {-! derive: Binary !-}
 
 instance Outputable CCallConv where
-  ppr StdCallConv = ptext SLIT("stdcall")
-  ppr CCallConv   = ptext SLIT("ccall")
-  ppr CmmCallConv = ptext SLIT("C--")
+  ppr StdCallConv = ptext (sLit "stdcall")
+  ppr CCallConv   = ptext (sLit "ccall")
+  ppr CmmCallConv = ptext (sLit "C--")
 
 defaultCCallConv :: CCallConv
 defaultCCallConv = CCallConv