X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fprelude%2FForeignCall.lhs;h=a80900e506c34aae6e98cdc300b5bc07ba226f2b;hb=2378b2325df64a5ccc5b2e038ac3dbb848dea5f7;hp=2f44e05e1ace373eb4d450df796ff788940b5a9f;hpb=8e3b5645e0bab683444c81bbbac87e2df6799959;p=ghc-hetmet.git diff --git a/compiler/prelude/ForeignCall.lhs b/compiler/prelude/ForeignCall.lhs index 2f44e05..a80900e 100644 --- a/compiler/prelude/ForeignCall.lhs +++ b/compiler/prelude/ForeignCall.lhs @@ -4,6 +4,13 @@ \section[Foreign]{Foreign calls} \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module ForeignCall ( ForeignCall(..), Safety(..), playSafe, playThreadSafe, @@ -17,9 +24,7 @@ module ForeignCall ( withDNTypes ) where -#include "HsVersions.h" - -import FastString ( FastString, unpackFS ) +import FastString import Char ( isAlphaNum ) import Binary import Outputable @@ -65,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 @@ -111,7 +116,7 @@ data CCallTarget isDynamicTarget :: CCallTarget -> Bool isDynamicTarget DynamicTarget = True -isDynamicTarget other = False +isDynamicTarget _ = False \end{code} @@ -133,9 +138,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