data PrimArray a -- immutable arrays with Int indices
data PrimByteArray
-data Ref s a -- mutable variables
+data Ref a -- mutable variables
data PrimMutableArray s a -- mutable arrays with Int indices
data PrimMutableByteArray s
-newRef :: a -> ST s (Ref s a)
+newRef :: a -> IO (Ref a)
newRef = primNewRef
-readRef :: Ref s a -> ST s a
+readRef :: Ref a -> IO a
readRef = primReadRef
-writeRef :: Ref s a -> a -> ST s ()
+writeRef :: Ref a -> a -> IO ()
writeRef = primWriteRef
* included in the distribution.
*
* $RCSfile: type.c,v $
- * $Revision: 1.13 $
- * $Date: 1999/11/17 16:57:50 $
+ * $Revision: 1.14 $
+ * $Date: 1999/11/19 13:54:49 $
* ------------------------------------------------------------------------*/
#include "prelude.h"
case BARR_REP:
return typePrimByteArray;
case REF_REP:
- return ap2(typeRef,mkStateVar(),mkAlphaVar());
+ return ap(typeRef,mkAlphaVar());
case MUTARR_REP:
return ap2(typePrimMutableArray,mkStateVar(),mkAlphaVar());
case MUTBARR_REP:
data PrimArray a -- immutable arrays with Int indices
data PrimByteArray
-data Ref s a -- mutable variables
+data Ref a -- mutable variables
data PrimMutableArray s a -- mutable arrays with Int indices
data PrimMutableByteArray s
-newRef :: a -> ST s (Ref s a)
+newRef :: a -> IO (Ref a)
newRef = primNewRef
-readRef :: Ref s a -> ST s a
+readRef :: Ref a -> IO a
readRef = primReadRef
-writeRef :: Ref s a -> a -> ST s ()
+writeRef :: Ref a -> a -> IO ()
writeRef = primWriteRef
* Copyright (c) 1994-1998.
*
* $RCSfile: Assembler.c,v $
- * $Revision: 1.16 $
- * $Date: 1999/11/18 12:10:24 $
+ * $Revision: 1.17 $
+ * $Date: 1999/11/19 13:54:53 $
*
* This module provides functions to construct BCOs and other closures
* required by the bytecode compiler.
, { "primIsIEEEDouble", "", "B", MONAD_Id, i_PRIMOP1, i_isIEEEDouble }
/* Ref operations */
- , { "primNewRef", "a", "R", MONAD_ST, i_PRIMOP2, i_newRef }
- , { "primWriteRef", "Ra", "", MONAD_ST, i_PRIMOP2, i_writeRef }
- , { "primReadRef", "R", "a", MONAD_ST, i_PRIMOP2, i_readRef }
+ , { "primNewRef", "a", "R", MONAD_IO, i_PRIMOP2, i_newRef }
+ , { "primWriteRef", "Ra", "", MONAD_IO, i_PRIMOP2, i_writeRef }
+ , { "primReadRef", "R", "a", MONAD_IO, i_PRIMOP2, i_readRef }
, { "primSameRef", "RR", "B", MONAD_Id, i_PRIMOP2, i_sameRef }
/* PrimArray operations */