ACME-0.0.0.1: Essential features

Safe HaskellSafe-Inferred
LanguageHaskell98

Acme.Money

Description

A monad to handle economic transactions between computations

Synopsis

Documentation

data Money u t Source

Instances

Monad (Money u) 

lift' :: IO t -> Money u t Source

Lift an IO computation into the Money monad

charge :: Float -> Money u () Source

Charge n simoleons from the purchasing computation

purchase :: Int -> Money u u Source

Purchase the ith computation from the list

runMoneys :: [(IORef Float, Money a a)] -> [IO a] Source

Run several computations, where the computations may purchase the use of one another