Add sizeof(Mutable)Array# primitives
[ghc-hetmet.git] / compiler / prelude / primops.txt.pp
index 3d643bd..525a837 100644 (file)
@@ -600,6 +600,14 @@ primop  WriteArrayOp "writeArray#" GenPrimOp
    with
    has_side_effects = True
 
+primop  SizeofArrayOp "sizeofArray#" GenPrimOp
+   Array# a -> Int#
+   {Return the number of elements in the array.}
+
+primop  SizeofMutableArrayOp "sizeofMutableArray#" GenPrimOp
+   MutableArray# s a -> Int#
+   {Return the number of elements in the array.}
+
 primop  IndexArrayOp "indexArray#" GenPrimOp
    Array# a -> Int# -> (# a #)
    {Read from specified index of immutable array. Result is packaged into