Safe Haskell | Safe-Inferred |
---|
Provides a counter monad.
- newtype CounterT m a = Counter {
- runCounterT :: Int -> m (a, Int)
- class Monad m => MonadCounter m where
- withCounter :: (Monad m, Functor m) => CounterT m a -> m a
Documentation
A counter monad.
Counter | |
|
class Monad m => MonadCounter m whereSource
Typeclass for all counter monads.
Monad m => MonadCounter (CounterT m) | |
MonadCounter m0 => MonadCounter (SplErrT m0) | |
MonadCounter m => MonadCounter (AtomStoreT m) | |
MonadCounter m0 => MonadCounter (VocabT m0) | |
MonadCounter m0 => MonadCounter (DungeonT m0) | |
MonadCounter m0 => MonadCounter (PlayerT m0) | |
MonadCounter m0 => MonadCounter (ObjectT m0) | |
MonadCounter m0 => MonadCounter (RoomT m0) | |
MonadCounter m0 => MonadCounter (PlayerFilterT m0) | |
MonadCounter m0 => MonadCounter (StereoBuilderT m0) |
withCounter :: (Monad m, Functor m) => CounterT m a -> m aSource
Run the given function inside a counter