[project @ 2001-02-14 12:59:34 by simonmar]
[ghc-hetmet.git] / ghc / compiler / prelude / primops.txt
index 73d145e..1d3d99a 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------
--- $Id: primops.txt,v 1.15 2001/01/15 16:55:24 sewardj Exp $
+-- $Id: primops.txt,v 1.16 2001/02/14 12:59:35 simonmar Exp $
 --
 -- Primitive Operations
 --
@@ -1001,6 +1001,13 @@ primop  TakeMVarOp "takeMVar#" GenPrimOp
    has_side_effects = True
    out_of_line      = True
 
+primop  TryTakeMVarOp "tryTakeMVar#" GenPrimOp
+   MVar# s a -> State# s -> (# State# s, Int#, a #)
+   with
+   usage            = { mangle TryTakeMVarOp [mkM, mkP] mkM }
+   has_side_effects = True
+   out_of_line      = True
+
 primop  PutMVarOp "putMVar#" GenPrimOp
    MVar# s a -> a -> State# s -> State# s
    with
@@ -1009,18 +1016,19 @@ primop  PutMVarOp "putMVar#" GenPrimOp
    has_side_effects = True
    out_of_line      = True
 
+primop  TryPutMVarOp "tryPutMVar#" GenPrimOp
+   MVar# s a -> a -> State# s -> (# State# s, Int# #)
+   with
+   strictness       = { \ arity -> StrictnessInfo [wwPrim, wwLazy, wwPrim] False }
+   usage            = { mangle PutMVarOp [mkM, mkM, mkP] mkR }
+   has_side_effects = True
+   out_of_line      = True
+
 primop  SameMVarOp "sameMVar#" GenPrimOp
    MVar# s a -> MVar# s a -> Bool
    with
    usage = { mangle SameMVarOp [mkP, mkP] mkM }
 
-primop  TryTakeMVarOp "tryTakeMVar#" GenPrimOp
-   MVar# s a -> State# s -> (# State# s, Int#, a #)
-   with
-   usage            = { mangle TryTakeMVarOp [mkM, mkP] mkM }
-   has_side_effects = True
-   out_of_line      = True
-
 primop  IsEmptyMVarOp "isEmptyMVar#" GenPrimOp
    MVar# s a -> State# s -> (# State# s, Int# #)
    with