Improve error reporting for kind errors (fix Trac #1633)
[ghc-hetmet.git] / compiler / prelude / primops.txt.pp
index f84e00f..942adb0 100644 (file)
@@ -814,6 +814,11 @@ primop  NewPinnedByteArrayOp_Char "newPinnedByteArray#" GenPrimOp
    {Create a mutable byte array that the GC guarantees not to move.}
    with out_of_line = True
 
+primop  NewAlignedPinnedByteArrayOp_Char "newAlignedPinnedByteArray#" GenPrimOp
+   Int# -> Int# -> State# s -> (# State# s, MutableByteArray# s #)
+   {Create a mutable byte array, aligned by the specified amount, that the GC guarantees not to move.}
+   with out_of_line = True
+
 primop  ByteArrayContents_Char "byteArrayContents#" GenPrimOp
    ByteArray# -> Addr#
    {Intended for use with pinned arrays; otherwise very unsafe!}
@@ -1279,6 +1284,11 @@ primop  UnblockAsyncExceptionsOp "unblockAsyncExceptions#" GenPrimOp
    with
    out_of_line = True
 
+primop  AsyncExceptionsBlockedOp "asyncExceptionsBlocked#" GenPrimOp
+        State# RealWorld -> (# State# RealWorld, Int# #)
+   with
+   out_of_line = True
+
 ------------------------------------------------------------------------
 section "STM-accessible Mutable Variables"
 ------------------------------------------------------------------------
@@ -1335,6 +1345,13 @@ primop   ReadTVarOp "readTVar#" GenPrimOp
    with
    out_of_line = True
 
+primop ReadTVarIOOp "readTVarIO#" GenPrimOp
+       TVar# s a
+    -> State# s -> (# State# s, a #)
+   {Read contents of {\tt TVar\#} outside an STM transaction}
+   with
+   out_of_line = True
+
 primop WriteTVarOp "writeTVar#" GenPrimOp
        TVar# s a
     -> a
@@ -1526,6 +1543,11 @@ primop  NoDuplicateOp "noDuplicate#" GenPrimOp
    with
    out_of_line = True
 
+primop  ThreadStatusOp "threadStatus#" GenPrimOp
+   ThreadId# -> State# RealWorld -> (# State# RealWorld, Int# #)
+   with
+   out_of_line = True
+
 ------------------------------------------------------------------------
 section "Weak pointers"
 ------------------------------------------------------------------------
@@ -1540,6 +1562,12 @@ primop  MkWeakOp "mkWeak#" GenPrimOp
    has_side_effects = True
    out_of_line      = True
 
+primop  MkWeakForeignEnvOp "mkWeakForeignEnv#" GenPrimOp
+   o -> b -> Addr# -> Addr# -> Int# -> Addr# -> State# RealWorld -> (# State# RealWorld, Weak# b #)
+   with
+   has_side_effects = True
+   out_of_line      = True
+
 primop  DeRefWeakOp "deRefWeak#" GenPrimOp
    Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, a #)
    with
@@ -1616,6 +1644,12 @@ primop  ParOp "par#" GenPrimOp
       -- gets evaluted strictly, which it should *not* be
    has_side_effects = True
 
+primop GetSparkOp "getSpark#" GenPrimOp
+   State# s -> (# State# s, Int#, a #)
+   with
+   has_side_effects = True
+   out_of_line = True
+
 -- HWL: The first 4 Int# in all par... annotations denote:
 --   name, granularity info, size of result, degree of parallelism
 --      Same  structure as _seq_ i.e. returns Int#
@@ -1714,6 +1748,17 @@ primop  GetApStackValOp "getApStackVal#" GenPrimOp
    out_of_line = True
 
 ------------------------------------------------------------------------
+section "Misc"
+        {These aren't nearly as wired in as Etc...}
+------------------------------------------------------------------------
+
+primop  TraceCcsOp "traceCcs#" GenPrimOp
+   a -> b -> b
+   with
+   has_side_effects = True
+   out_of_line = True
+
+------------------------------------------------------------------------
 section "Etc" 
        {Miscellaneous built-ins}
 ------------------------------------------------------------------------