-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Mutable variables and tuples -- -- This package defines the classes Var and MTuple of -- variables and tuples mutable within appropriate monads, as well as -- some instances of these classes. @package var @version 0.1.0.0 module Data.Var.Class class Monad m => Var var a m where newVar = lift . newVar readVar = lift . readVar writeVar var = lift . writeVar var modifyVar var f = readVar var >>= writeVar var . f modifyVar' var f = readVar var >>= \ a -> writeVar var $! f a newVar :: Var var a m => a -> m (var a) readVar :: Var var a m => var a -> m a writeVar :: Var var a m => var a -> a -> m () modifyVar :: Var var a m => var a -> (a -> a) -> m () modifyVar' :: Var var a m => var a -> (a -> a) -> m () instance Var (STVar s) a (ST s) instance Var (STVar s) a (ST s) instance Var IOVar a IO module Data.Var.Storable data StorableVar a withStorableVar :: StorableVar a -> (Ptr a -> IO b) -> IO b touchStorableVar :: StorableVar a -> IO () instance Typeable1 StorableVar instance Show (StorableVar a) instance Eq (StorableVar a) instance Ord (StorableVar a) instance Storable a => Var StorableVar a IO instance Typeable a => Data (StorableVar a) module Data.Var module Data.Tuple.MTuple class Monad m => MTuple var t m where thawTuple = lift . thawTuple freezeTuple = lift . freezeTuple thawTuple :: MTuple var t m => t -> m (var t) freezeTuple :: MTuple var t m => var t -> m t class MTuple var t m => MField1 var t a m | t -> a where read1 = lift . read1 write1 var = lift . write1 var modify1 var f = write1 var . f =<< read1 var modify1' var f = read1 var >>= \ a -> write1 var $! f a read1 :: MField1 var t a m => var t -> m a write1 :: MField1 var t a m => var t -> a -> m () modify1 :: MField1 var t a m => var t -> (a -> a) -> m () modify1' :: MField1 var t a m => var t -> (a -> a) -> m () class MTuple var t m => MField2 var t a m | t -> a where read2 = lift . read2 write2 var = lift . write2 var modify2 var f = write2 var . f =<< read2 var modify2' var f = read2 var >>= \ a -> write2 var $! f a read2 :: MField2 var t a m => var t -> m a write2 :: MField2 var t a m => var t -> a -> m () modify2 :: MField2 var t a m => var t -> (a -> a) -> m () modify2' :: MField2 var t a m => var t -> (a -> a) -> m () class MTuple var t m => MField3 var t a m | t -> a where read3 = lift . read3 write3 var = lift . write3 var modify3 var f = write3 var . f =<< read3 var modify3' var f = read3 var >>= \ a -> write3 var $! f a read3 :: MField3 var t a m => var t -> m a write3 :: MField3 var t a m => var t -> a -> m () modify3 :: MField3 var t a m => var t -> (a -> a) -> m () modify3' :: MField3 var t a m => var t -> (a -> a) -> m () class MTuple var t m => MField4 var t a m | t -> a where read4 = lift . read4 write4 var = lift . write4 var modify4 var f = write4 var . f =<< read4 var modify4' var f = read4 var >>= \ a -> write4 var $! f a read4 :: MField4 var t a m => var t -> m a write4 :: MField4 var t a m => var t -> a -> m () modify4 :: MField4 var t a m => var t -> (a -> a) -> m () modify4' :: MField4 var t a m => var t -> (a -> a) -> m () class MTuple var t m => MField5 var t a m | t -> a where read5 = lift . read5 write5 var = lift . write5 var modify5 var f = write5 var . f =<< read5 var modify5' var f = read5 var >>= \ a -> write5 var $! f a read5 :: MField5 var t a m => var t -> m a write5 :: MField5 var t a m => var t -> a -> m () modify5 :: MField5 var t a m => var t -> (a -> a) -> m () modify5' :: MField5 var t a m => var t -> (a -> a) -> m () class MTuple var t m => MField6 var t a m | t -> a where read6 = lift . read6 write6 var = lift . write6 var modify6 var f = write6 var . f =<< read6 var modify6' var f = read6 var >>= \ a -> write6 var $! f a read6 :: MField6 var t a m => var t -> m a write6 :: MField6 var t a m => var t -> a -> m () modify6 :: MField6 var t a m => var t -> (a -> a) -> m () modify6' :: MField6 var t a m => var t -> (a -> a) -> m () class MTuple var t m => MField7 var t a m | t -> a where read7 = lift . read7 write7 var = lift . write7 var modify7 var f = write7 var . f =<< read7 var modify7' var f = read7 var >>= \ a -> write7 var $! f a read7 :: MField7 var t a m => var t -> m a write7 :: MField7 var t a m => var t -> a -> m () modify7 :: MField7 var t a m => var t -> (a -> a) -> m () modify7' :: MField7 var t a m => var t -> (a -> a) -> m () class MTuple var t m => MField8 var t a m | t -> a where read8 = lift . read8 write8 var = lift . write8 var modify8 var f = write8 var . f =<< read8 var modify8' var f = read8 var >>= \ a -> write8 var $! f a read8 :: MField8 var t a m => var t -> m a write8 :: MField8 var t a m => var t -> a -> m () modify8 :: MField8 var t a m => var t -> (a -> a) -> m () modify8' :: MField8 var t a m => var t -> (a -> a) -> m () class MTuple var t m => MField9 var t a m | t -> a where read9 = lift . read9 write9 var = lift . write9 var modify9 var f = write9 var . f =<< read9 var modify9' var f = read9 var >>= \ a -> write9 var $! f a read9 :: MField9 var t a m => var t -> m a write9 :: MField9 var t a m => var t -> a -> m () modify9 :: MField9 var t a m => var t -> (a -> a) -> m () modify9' :: MField9 var t a m => var t -> (a -> a) -> m () module Data.Tuple.Fields.Unsafe data List a Nil :: List a (:|) :: a -> List a -> List a data MutableArray s a class Monad m => MonadPrim m where type family World m prim :: MonadPrim m => (State# (World m) -> (# State# (World m), a #)) -> m a data Prim s a runPrim :: MonadPrim m => Prim (World m) a -> m a class Fields a where type family ListRep a :: List * type instance ListRep a = GListRep (Rep a) size = gsize . reproxyRep readFields array = fmap to . greadFields array writeFields array i = gwriteFields array i . from size :: Fields a => t a -> Int readFields :: Fields a => MutableArray s Any -> Int -> Prim s a writeFields :: Fields a => MutableArray s Any -> Int -> a -> Prim s () sizeOf :: Fields a => a -> Int type Field1 a = Find N0 (ToList a) type Field2 a = Find N1 (ToList a) type Field3 a = Find N2 (ToList a) type Field4 a = Find N3 (ToList a) type Field5 a = Find N4 (ToList a) type Field6 a = Find N5 (ToList a) type Field7 a = Find N6 (ToList a) type Field8 a = Find N7 (ToList a) type Field9 a = Find N8 (ToList a) instance Fields (Identity a) instance Fields (a, b, c, d, e, f, g) instance Fields (a, b, c, d, e, f) instance Fields (a, b, c, d, e) instance Fields (a, b, c, d) instance Fields (a, b, c) instance Fields (a, b) instance Fields () instance (GFields a, GFields b) => GFields (a :*: b) instance GFields f => GFields (M1 i c f) instance GFields (K1 i c) instance GFields U1 module Data.Tuple.Fields class Fields a where type instance ListRep a = GListRep (Rep a) size = gsize . reproxyRep readFields array = fmap to . greadFields array writeFields array i = gwriteFields array i . from type Field1 a = Find N0 (ToList a) type Field2 a = Find N1 (ToList a) type Field3 a = Find N2 (ToList a) type Field4 a = Find N3 (ToList a) type Field5 a = Find N4 (ToList a) type Field6 a = Find N5 (ToList a) type Field7 a = Find N6 (ToList a) type Field8 a = Find N7 (ToList a) type Field9 a = Find N8 (ToList a) module Data.Tuple.Storable data StorableTuple a withStorableTuple :: StorableTuple a -> (forall e. Ptr e -> IO b) -> IO b touchStorableTuple :: StorableTuple a -> IO () instance Typeable1 StorableTuple instance Show (StorableTuple a) instance Eq (StorableTuple a) instance Ord (StorableTuple a) instance (Storable a, Storable b, Storable c, Storable d, Storable e, Storable f, Storable g) => StorableFields (a, b, c, d, e, f, g) instance (Storable a, Storable b, Storable c, Storable d, Storable e, Storable f) => StorableFields (a, b, c, d, e, f) instance (Storable a, Storable b, Storable c, Storable d, Storable e) => StorableFields (a, b, c, d, e) instance (Storable a, Storable b, Storable c, Storable d) => StorableFields (a, b, c, d) instance (Storable a, Storable b, Storable c) => StorableFields (a, b, c) instance (Storable a, Storable b) => StorableFields (a, b) instance StorableFields () instance (GStorableFields a, GStorableFields b) => GStorableFields (a :*: b) instance GStorableFields f => GStorableFields (M1 i c f) instance Storable c => GStorableFields (K1 i c) instance GStorableFields U1 instance (Fields t, MTuple StorableTuple t IO, Storable (Field1 t), Storable (Field2 t), Storable (Field3 t), Storable (Field4 t), Storable (Field5 t), Storable (Field6 t), Storable (Field7 t), Storable (Field8 t), a ~ Field9 t, Storable a) => MField9 StorableTuple t a IO instance (Fields t, MTuple StorableTuple t IO, Storable (Field1 t), Storable (Field2 t), Storable (Field3 t), Storable (Field4 t), Storable (Field5 t), Storable (Field6 t), Storable (Field7 t), a ~ Field8 t, Storable a) => MField8 StorableTuple t a IO instance (Fields t, MTuple StorableTuple t IO, Storable (Field1 t), Storable (Field2 t), Storable (Field3 t), Storable (Field4 t), Storable (Field5 t), Storable (Field6 t), a ~ Field7 t, Storable a) => MField7 StorableTuple t a IO instance (Fields t, MTuple StorableTuple t IO, Storable (Field1 t), Storable (Field2 t), Storable (Field3 t), Storable (Field4 t), Storable (Field5 t), a ~ Field6 t, Storable a) => MField6 StorableTuple t a IO instance (Fields t, MTuple StorableTuple t IO, Storable (Field1 t), Storable (Field2 t), Storable (Field3 t), Storable (Field4 t), a ~ Field5 t, Storable a) => MField5 StorableTuple t a IO instance (Fields t, MTuple StorableTuple t IO, Storable (Field1 t), Storable (Field2 t), Storable (Field3 t), a ~ Field4 t, Storable a) => MField4 StorableTuple t a IO instance (Fields t, MTuple StorableTuple t IO, Storable (Field1 t), Storable (Field2 t), a ~ Field3 t, Storable a) => MField3 StorableTuple t a IO instance (Fields t, MTuple StorableTuple t IO, Storable (Field1 t), a ~ Field2 t, Storable a) => MField2 StorableTuple t a IO instance (Fields t, MTuple StorableTuple t IO, a ~ Field1 t, Storable a) => MField1 StorableTuple t a IO instance (Storable a, Storable b, Storable c, Storable d, Storable e, Storable f, Storable g) => MTuple StorableTuple (a, b, c, d, e, f, g) IO instance (Storable a, Storable b, Storable c, Storable d, Storable e, Storable f) => MTuple StorableTuple (a, b, c, d, e, f) IO instance (Storable a, Storable b, Storable c, Storable d, Storable e) => MTuple StorableTuple (a, b, c, d, e) IO instance (Storable a, Storable b, Storable c, Storable d) => MTuple StorableTuple (a, b, c, d) IO instance (Storable a, Storable b, Storable c) => MTuple StorableTuple (a, b, c) IO instance (Storable a, Storable b) => MTuple StorableTuple (a, b) IO instance MTuple StorableTuple () IO instance Typeable a => Data (StorableTuple a) module Data.ByteArraySlice.Unsafe data MutableByteArray s class Monad m => MonadPrim m where type family World m prim :: MonadPrim m => (State# (World m) -> (# State# (World m), a #)) -> m a data Prim s a runPrim :: MonadPrim m => Prim (World m) a -> m a class ByteArraySlice a where plusByteSize i = gplusByteSize i . reproxyRep readByteOff array = fmap to . greadByteOff array writeByteOff array i = gwriteByteOff array i . from plusByteSize :: ByteArraySlice a => Int -> t a -> Int readByteOff :: ByteArraySlice a => MutableByteArray s -> Int -> Prim s a writeByteOff :: ByteArraySlice a => MutableByteArray s -> Int -> a -> Prim s () byteSizeOf :: ByteArraySlice a => a -> Int instance ByteArraySlice (Ptr a) instance ByteArraySlice (FunPtr a) instance ByteArraySlice (StablePtr a) instance ByteArraySlice Word64 instance ByteArraySlice Word32 instance ByteArraySlice Word16 instance ByteArraySlice Word8 instance ByteArraySlice Int64 instance ByteArraySlice Int32 instance ByteArraySlice Int16 instance ByteArraySlice Int8 instance ByteArraySlice Double instance ByteArraySlice Float instance ByteArraySlice Word instance ByteArraySlice Int instance ByteArraySlice Char instance ByteArraySlice Bool instance (ByteArraySlice a, ByteArraySlice b, ByteArraySlice c, ByteArraySlice d, ByteArraySlice e, ByteArraySlice f, ByteArraySlice g) => ByteArraySlice (a, b, c, d, e, f, g) instance (ByteArraySlice a, ByteArraySlice b, ByteArraySlice c, ByteArraySlice d, ByteArraySlice e, ByteArraySlice f) => ByteArraySlice (a, b, c, d, e, f) instance (ByteArraySlice a, ByteArraySlice b, ByteArraySlice c, ByteArraySlice d, ByteArraySlice e) => ByteArraySlice (a, b, c, d, e) instance (ByteArraySlice a, ByteArraySlice b, ByteArraySlice c, ByteArraySlice d) => ByteArraySlice (a, b, c, d) instance (ByteArraySlice a, ByteArraySlice b, ByteArraySlice c) => ByteArraySlice (a, b, c) instance (ByteArraySlice a, ByteArraySlice b) => ByteArraySlice (a, b) instance ByteArraySlice () instance (GByteArraySlice a, GByteArraySlice b) => GByteArraySlice (a :*: b) instance GByteArraySlice f => GByteArraySlice (M1 i c f) instance ByteArraySlice c => GByteArraySlice (K1 i c) instance GByteArraySlice U1 module Data.ByteArraySlice class ByteArraySlice a where plusByteSize i = gplusByteSize i . reproxyRep readByteOff array = fmap to . greadByteOff array writeByteOff array i = gwriteByteOff array i . from module Data.Tuple.IO data IOTuple a data IOUTuple a instance Typeable1 IOTuple instance Typeable1 IOUTuple instance Eq (IOTuple a) instance Eq (IOUTuple a) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), ByteArraySlice (Field6 t), ByteArraySlice (Field7 t), ByteArraySlice (Field8 t), a ~ Field9 t, ByteArraySlice a) => MField9 IOUTuple t a IO instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), ByteArraySlice (Field6 t), ByteArraySlice (Field7 t), a ~ Field8 t, ByteArraySlice a) => MField8 IOUTuple t a IO instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), ByteArraySlice (Field6 t), a ~ Field7 t, ByteArraySlice a) => MField7 IOUTuple t a IO instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), a ~ Field6 t, ByteArraySlice a) => MField6 IOUTuple t a IO instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), a ~ Field5 t, ByteArraySlice a) => MField5 IOUTuple t a IO instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), a ~ Field4 t, ByteArraySlice a) => MField4 IOUTuple t a IO instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), a ~ Field3 t, ByteArraySlice a) => MField3 IOUTuple t a IO instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), a ~ Field2 t, ByteArraySlice a) => MField2 IOUTuple t a IO instance (Fields t, ByteArraySlice t, a ~ Field1 t, ByteArraySlice a) => MField1 IOUTuple t a IO instance (Fields t, ByteArraySlice t) => MTuple IOUTuple t IO instance (Fields t, a ~ Field9 t) => MField9 IOTuple t a IO instance (Fields t, a ~ Field8 t) => MField8 IOTuple t a IO instance (Fields t, a ~ Field7 t) => MField7 IOTuple t a IO instance (Fields t, a ~ Field6 t) => MField6 IOTuple t a IO instance (Fields t, a ~ Field5 t) => MField5 IOTuple t a IO instance (Fields t, a ~ Field4 t) => MField4 IOTuple t a IO instance (Fields t, a ~ Field3 t) => MField3 IOTuple t a IO instance (Fields t, a ~ Field2 t) => MField2 IOTuple t a IO instance (Fields t, a ~ Field1 t) => MField1 IOTuple t a IO instance Fields t => MTuple IOTuple t IO module Data.Tuple.ST data STTuple s a data STUTuple s a instance Typeable2 STTuple instance Typeable2 STUTuple instance Eq (STTuple s a) instance Eq (STUTuple s a) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), ByteArraySlice (Field6 t), ByteArraySlice (Field7 t), ByteArraySlice (Field8 t), a ~ Field9 t, ByteArraySlice a) => MField9 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), ByteArraySlice (Field6 t), ByteArraySlice (Field7 t), a ~ Field8 t, ByteArraySlice a) => MField8 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), ByteArraySlice (Field6 t), a ~ Field7 t, ByteArraySlice a) => MField7 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), a ~ Field6 t, ByteArraySlice a) => MField6 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), a ~ Field5 t, ByteArraySlice a) => MField5 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), a ~ Field4 t, ByteArraySlice a) => MField4 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), a ~ Field3 t, ByteArraySlice a) => MField3 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), a ~ Field2 t, ByteArraySlice a) => MField2 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, a ~ Field1 t, ByteArraySlice a) => MField1 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t) => MTuple (STUTuple s) t (ST s) instance (Fields t, a ~ Field9 t) => MField9 (STTuple s) t a (ST s) instance (Fields t, a ~ Field8 t) => MField8 (STTuple s) t a (ST s) instance (Fields t, a ~ Field7 t) => MField7 (STTuple s) t a (ST s) instance (Fields t, a ~ Field6 t) => MField6 (STTuple s) t a (ST s) instance (Fields t, a ~ Field5 t) => MField5 (STTuple s) t a (ST s) instance (Fields t, a ~ Field4 t) => MField4 (STTuple s) t a (ST s) instance (Fields t, a ~ Field3 t) => MField3 (STTuple s) t a (ST s) instance (Fields t, a ~ Field2 t) => MField2 (STTuple s) t a (ST s) instance (Fields t, a ~ Field1 t) => MField1 (STTuple s) t a (ST s) instance Fields t => MTuple (STTuple s) t (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), ByteArraySlice (Field6 t), ByteArraySlice (Field7 t), ByteArraySlice (Field8 t), a ~ Field9 t, ByteArraySlice a) => MField9 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), ByteArraySlice (Field6 t), ByteArraySlice (Field7 t), a ~ Field8 t, ByteArraySlice a) => MField8 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), ByteArraySlice (Field6 t), a ~ Field7 t, ByteArraySlice a) => MField7 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), ByteArraySlice (Field5 t), a ~ Field6 t, ByteArraySlice a) => MField6 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), ByteArraySlice (Field4 t), a ~ Field5 t, ByteArraySlice a) => MField5 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), ByteArraySlice (Field3 t), a ~ Field4 t, ByteArraySlice a) => MField4 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), ByteArraySlice (Field2 t), a ~ Field3 t, ByteArraySlice a) => MField3 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, ByteArraySlice (Field1 t), a ~ Field2 t, ByteArraySlice a) => MField2 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t, a ~ Field1 t, ByteArraySlice a) => MField1 (STUTuple s) t a (ST s) instance (Fields t, ByteArraySlice t) => MTuple (STUTuple s) t (ST s) instance (Fields t, a ~ Field9 t) => MField9 (STTuple s) t a (ST s) instance (Fields t, a ~ Field8 t) => MField8 (STTuple s) t a (ST s) instance (Fields t, a ~ Field7 t) => MField7 (STTuple s) t a (ST s) instance (Fields t, a ~ Field6 t) => MField6 (STTuple s) t a (ST s) instance (Fields t, a ~ Field5 t) => MField5 (STTuple s) t a (ST s) instance (Fields t, a ~ Field4 t) => MField4 (STTuple s) t a (ST s) instance (Fields t, a ~ Field3 t) => MField3 (STTuple s) t a (ST s) instance (Fields t, a ~ Field2 t) => MField2 (STTuple s) t a (ST s) instance (Fields t, a ~ Field1 t) => MField1 (STTuple s) t a (ST s) instance Fields t => MTuple (STTuple s) t (ST s) module Data.Var.IO -- | A mutable variable in the IO monad type IOVar = IORef -- | A mutable variable containing an unboxed value of type a in -- the IO monad data IOUVar a instance Typeable1 IOUVar instance Eq (IOUVar a) instance ByteArraySlice a => Var IOUVar a IO module Data.Var.ST -- | a value of type STVar s a is a mutable variable in -- state thread s, containing a value of type a type STVar = STRef -- | a value of type STUVar s a is a mutable variable in -- state thread s, containing an unboxed value of type -- a data STUVar s a instance Typeable2 STUVar instance Eq (STUVar s a) instance ByteArraySlice a => Var (STUVar s) a (ST s) instance ByteArraySlice a => Var (STUVar s) a (ST s)