projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Comments only
[ghc-hetmet.git]
/
compiler
/
prelude
/
ForeignCall.lhs
diff --git
a/compiler/prelude/ForeignCall.lhs
b/compiler/prelude/ForeignCall.lhs
index
a92cabd
..
87bb94a
100644
(file)
--- a/
compiler/prelude/ForeignCall.lhs
+++ b/
compiler/prelude/ForeignCall.lhs
@@
-13,7
+13,7
@@
{-# LANGUAGE DeriveDataTypeable #-}
module ForeignCall (
{-# LANGUAGE DeriveDataTypeable #-}
module ForeignCall (
- ForeignCall(..),
+ ForeignCall(..), isSafeForeignCall,
Safety(..), playSafe, playInterruptible,
CExportSpec(..), CLabelString, isCLabelString, pprCLabelString,
Safety(..), playSafe, playInterruptible,
CExportSpec(..), CLabelString, isCLabelString, pprCLabelString,
@@
-43,6
+43,9
@@
newtype ForeignCall = CCall CCallSpec
deriving Eq
{-! derive: Binary !-}
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
-- We may need more clues to distinguish foreign calls
-- but this simple printer will do for now
instance Outputable ForeignCall where