conductive-base-0.2: a library for livecoding and real-time musical applications

Sound.Conductive.MVarUtils

Description

These functions were found to be useful for dealing with MVars. For more on MVars, see http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Control-Concurrent-MVar.html.

Synopsis

Documentation

wm :: MVar a -> (a -> a1) -> IO a1Source

Applies a pure function to the value stored in an MVar.

wIOm :: MVar a -> (a -> IO b) -> IO bSource

Applies an IO function to the value stored in an MVar.

wcm :: MVar a -> (a -> a) -> IO aSource

Changes the value stored in an MVar based on a pure function.

withChangeToMVar :: MVar a -> (a -> a) -> IO aSource

An alias for the wcm function.