antisplice-0.12.3.0: An engine for text-based dungeons.

Safe HaskellSafe-Inferred

Game.Antisplice.Utils.Counter

Description

Provides a counter monad.

Synopsis

Documentation

class Monad m => MonadCounter m whereSource

Typeclass for all counter monads.

Methods

countOn :: m IntSource

Tell the current number and increment it

withCounter :: (Monad m, Functor m) => CounterT m a -> m aSource

Run the given function inside a counter