X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fprelude%2FForeignCall.lhs;fp=compiler%2Fprelude%2FForeignCall.lhs;h=87bb94a14862c5167a55e6e913de8241703c4597;hb=4177efa79d0ebc45e1319caff1c000f5fb6cfdcf;hp=a92cabdec054a7d542d78a917790527a0624b34b;hpb=5e0059a9fd797d550aa7dd856a14c12eb0914578;p=ghc-hetmet.git diff --git a/compiler/prelude/ForeignCall.lhs b/compiler/prelude/ForeignCall.lhs index a92cabd..87bb94a 100644 --- a/compiler/prelude/ForeignCall.lhs +++ b/compiler/prelude/ForeignCall.lhs @@ -13,7 +13,7 @@ {-# LANGUAGE DeriveDataTypeable #-} module ForeignCall ( - ForeignCall(..), + ForeignCall(..), isSafeForeignCall, Safety(..), playSafe, playInterruptible, CExportSpec(..), CLabelString, isCLabelString, pprCLabelString, @@ -43,6 +43,9 @@ newtype ForeignCall = CCall CCallSpec deriving Eq {-! derive: Binary !-} +isSafeForeignCall :: ForeignCall -> Bool +isSafeForeignCall (CCall (CCallSpec _ _ safe)) = playSafe safe + -- We may need more clues to distinguish foreign calls -- but this simple printer will do for now instance Outputable ForeignCall where