withDNTypes
) where
-#include "HsVersions.h"
-
-import FastString ( FastString, unpackFS )
+import FastString
import Char ( isAlphaNum )
import Binary
import Outputable
{-! 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
isDynamicTarget :: CCallTarget -> Bool
isDynamicTarget DynamicTarget = True
-isDynamicTarget other = False
+isDynamicTarget _ = False
\end{code}
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
{-! 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