stt-0.2.0.0: A monad transformer version of the ST monad

Safe HaskellNone

Control.Monad.Trans.ST.Internal

Synopsis

Documentation

newtype STT s m a

STT is the monad transformer providing polymorphic updateable references

Constructors

STT 

Fields

unSTT :: State# s -> m (STTRet s a)
 

Instances

MonadError e m => MonadError e (STT s m) 
MonadReader r m => MonadReader r (STT s m) 
MonadState s m => MonadState s (STT s' m) 
MonadWriter w m => MonadWriter w (STT s m) 
MonadTrans (STT s) 
Monad m => Monad (STT s m) 
Functor m => Functor (STT s m) 
MonadFix m => MonadFix (STT s m) 
(Monad m, Functor m) => Applicative (STT s m) 
Monad m => PrimMonad (STT s m) 

data STTRet s a

Constructors

STTRet (State# s) a 

Instances

fixSTT :: MonadFix m => (a -> STT s m a) -> STT s m a

Allow the result of a state transformer computation to be used (lazily) inside the computation. Note that if f is strict, fixSTT f = _|_.