Copyright | (C) 2008-2011 Edward Kmett (C) 2008 Iavor S. Diatchki |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | portable |
Safe Haskell | Trustworthy |
Language | Haskell98 |
This library can be used to generate values (for example, new names) without the need to thread state. This means that functions that need to generate new values only need a supply object as an argument, and they do not need to return a new supply object as a result. This decreases the number of data-dependencies in a program, which makes it easier to exploit parallelism.
The technique for generating new values is based on the paper ''On Generating Unique Names'' by Lennart Augustsson, Mikael Rittri, and Dan Synek.
Documentation
Functor Supply Source # | |
Applicative Supply Source # | |
Foldable Supply Source # | |
Traversable Supply Source # | |
Comonad Supply Source # | |
Traversable1 Supply Source # | |
Apply Supply Source # | |
Extend Supply Source # | |
Foldable1 Supply Source # | |
Eq a => Eq (Supply a) Source # | |
Data a => Data (Supply a) Source # | |
Ord a => Ord (Supply a) Source # | |
Read a => Read (Supply a) Source # | |
Show a => Show (Supply a) Source # | |
newDupableSupply :: (a -> a) -> a -> IO (Supply a) Source #
leftSupply :: Supply a -> Supply a Source #
rightSupply :: Supply a -> Supply a Source #