summaryrefslogtreecommitdiff
path: root/compiler/prelude
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-07-13 00:57:01 +0100
committerIan Lynagh <igloo@earth.li>2011-07-13 01:29:46 +0100
commit820591722ccce6f8443dc9101055cc26d7be5a50 (patch)
tree84cd9b30e777dbfd7ac81ebee27ee1015253efb8 /compiler/prelude
parente6af412f3b7c502ffe09dc9f0381d4e5dd3b3327 (diff)
downloadhaskell-820591722ccce6f8443dc9101055cc26d7be5a50.tar.gz
Remove 'threadsafe' FFI imports
They've been deprecated since GHC 6.12.
Diffstat (limited to 'compiler/prelude')
-rw-r--r--compiler/prelude/ForeignCall.lhs17
1 files changed, 5 insertions, 12 deletions
diff --git a/compiler/prelude/ForeignCall.lhs b/compiler/prelude/ForeignCall.lhs
index 87bb94a148..ac19974976 100644
--- a/compiler/prelude/ForeignCall.lhs
+++ b/compiler/prelude/ForeignCall.lhs
@@ -62,10 +62,6 @@ data Safety
-- by a separate OS thread, i.e., _concurrently_ to the
-- execution of other Haskell threads.
- Bool -- Indicates the deprecated "threadsafe" annotation
- -- which is now an alias for "safe". This information
- -- is never used except to emit a deprecation warning.
-
| PlayInterruptible -- Like PlaySafe, but additionally
-- the worker thread running this foreign call may
-- be unceremoniously killed, so it must be scheduled
@@ -78,15 +74,14 @@ data Safety
{-! derive: Binary !-}
instance Outputable Safety where
- ppr (PlaySafe False) = ptext (sLit "safe")
- ppr (PlaySafe True) = ptext (sLit "threadsafe")
+ ppr PlaySafe = ptext (sLit "safe")
ppr PlayInterruptible = ptext (sLit "interruptible")
ppr PlayRisky = ptext (sLit "unsafe")
playSafe :: Safety -> Bool
-playSafe PlaySafe{} = True
+playSafe PlaySafe = True
playSafe PlayInterruptible = True
-playSafe PlayRisky = False
+playSafe PlayRisky = False
playInterruptible :: Safety -> Bool
playInterruptible PlayInterruptible = True
@@ -244,9 +239,8 @@ instance Binary ForeignCall where
get bh = do aa <- get bh; return (CCall aa)
instance Binary Safety where
- put_ bh (PlaySafe aa) = do
+ put_ bh PlaySafe = do
putByte bh 0
- put_ bh aa
put_ bh PlayInterruptible = do
putByte bh 1
put_ bh PlayRisky = do
@@ -254,8 +248,7 @@ instance Binary Safety where
get bh = do
h <- getByte bh
case h of
- 0 -> do aa <- get bh
- return (PlaySafe aa)
+ 0 -> do return PlaySafe
1 -> do return PlayInterruptible
_ -> do return PlayRisky