marvin-0.0.4: A modular bot for slack

Copyright(c) Justus Adam 2016
LicenseBSD3
Maintainerdev@justus.science
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Marvin.Util.Mutable

Description

 

Synopsis

Documentation

type Mutable v = IORef v Source #

A mutable reference to a value of type v

newMutable :: MonadIO m => a -> m (Mutable a) Source #

Create a new mutable reference of type v from an initial value.

readMutable :: MonadIO m => Mutable a -> m a Source #

Retrieve the value behind by a mutable reference.

writeMutable :: MonadIO m => Mutable a -> a -> m () Source #

Set the value inside a mutable reference.

modifyMutable :: MonadIO m => Mutable a -> (a -> a) -> m () Source #

Change the value behind a mutable reference.