antisplice-0.16.0.1: 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