Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 6e204a966e8c42d976f99a1700ce5f20 > files > 3133

ghc-7.4.2-4.mga5.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>UniqSupply</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_UniqSupply.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ghc-7.4.2: The GHC API</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">UniqSupply</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Main data type
</a><ul><li><a href="#g:2">Operations on supplies
</a></li></ul></li><li><a href="#g:3">Unique supply monad and its abstraction
</a><ul><li><a href="#g:4">Operations on the monad
</a></li><li><a href="#g:5">Deprecated operations on <code><a href="UniqSupply.html#t:UniqSM">UniqSM</a></code>
</a></li></ul></li></ul></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span>  <a href="#t:UniqSupply">UniqSupply</a> </li><li class="src short"><a href="#v:uniqFromSupply">uniqFromSupply</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; <a href="Unique.html#t:Unique">Unique</a></li><li class="src short"><a href="#v:uniqsFromSupply">uniqsFromSupply</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; [<a href="Unique.html#t:Unique">Unique</a>]</li><li class="src short"><a href="#v:takeUniqFromSupply">takeUniqFromSupply</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; (<a href="Unique.html#t:Unique">Unique</a>, <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a>)</li><li class="src short"><a href="#v:mkSplitUniqSupply">mkSplitUniqSupply</a> :: <a href="../base-4.5.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></li><li class="src short"><a href="#v:splitUniqSupply">splitUniqSupply</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; (<a href="UniqSupply.html#t:UniqSupply">UniqSupply</a>, <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a>)</li><li class="src short"><a href="#v:listSplitUniqSupply">listSplitUniqSupply</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; [<a href="UniqSupply.html#t:UniqSupply">UniqSupply</a>]</li><li class="src short"><span class="keyword">data</span>  <a href="#t:UniqSM">UniqSM</a> result</li><li class="src short"><span class="keyword">class</span> <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="#t:MonadUnique">MonadUnique</a> m  <span class="keyword">where</span><ul class="subs"><li><a href="#v:getUniqueSupplyM">getUniqueSupplyM</a> :: m <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></li><li><a href="#v:getUniqueM">getUniqueM</a> :: m <a href="Unique.html#t:Unique">Unique</a></li><li><a href="#v:getUniquesM">getUniquesM</a> :: m [<a href="Unique.html#t:Unique">Unique</a>]</li></ul></li><li class="src short"><a href="#v:initUs">initUs</a> ::  <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> a -&gt; (a, <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a>)</li><li class="src short"><a href="#v:initUs_">initUs_</a> ::  <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> a -&gt; a</li><li class="src short"><a href="#v:lazyThenUs">lazyThenUs</a> ::  <a href="UniqSupply.html#t:UniqSM">UniqSM</a> a -&gt; (a -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b) -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b</li><li class="src short"><a href="#v:lazyMapUs">lazyMapUs</a> ::  (a -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b) -&gt; [a] -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> [b]</li><li class="src short"><a href="#v:getUniqueUs">getUniqueUs</a> :: <a href="UniqSupply.html#t:UniqSM">UniqSM</a> <a href="Unique.html#t:Unique">Unique</a></li><li class="src short"><a href="#v:getUs">getUs</a> :: <a href="UniqSupply.html#t:UniqSM">UniqSM</a> <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></li><li class="src short"><a href="#v:returnUs">returnUs</a> ::  a -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> a</li><li class="src short"><a href="#v:thenUs">thenUs</a> ::  <a href="UniqSupply.html#t:UniqSM">UniqSM</a> a -&gt; (a -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b) -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b</li><li class="src short"><a href="#v:mapUs">mapUs</a> ::  (a -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b) -&gt; [a] -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> [b]</li></ul></div><div id="interface"><h1 id="g:1">Main data type
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:UniqSupply" class="def">UniqSupply</a>  </p><div class="doc"><p>A value of type <code><a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></code> is unique, and it can
 supply <em>one</em> distinct <code><a href="Unique.html#t:Unique">Unique</a></code>.  Also, from the supply, one can
 also manufacture an arbitrary number of further <code>UniqueSupply</code> values,
 which will be distinct from the first and from all others.
</p></div></div><h2 id="g:2">Operations on supplies
</h2><div class="top"><p class="src"><a name="v:uniqFromSupply" class="def">uniqFromSupply</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; <a href="Unique.html#t:Unique">Unique</a></p><div class="doc"><p>Obtain the <code><a href="Unique.html#t:Unique">Unique</a></code> from this particular <code><a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:uniqsFromSupply" class="def">uniqsFromSupply</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; [<a href="Unique.html#t:Unique">Unique</a>]</p><div class="doc"><p>Obtain an infinite list of <code><a href="Unique.html#t:Unique">Unique</a></code> that can be generated by constant splitting of the supply
</p></div></div><div class="top"><p class="src"><a name="v:takeUniqFromSupply" class="def">takeUniqFromSupply</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; (<a href="Unique.html#t:Unique">Unique</a>, <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a>)</p><div class="doc"><p>Obtain the <code><a href="Unique.html#t:Unique">Unique</a></code> from this particular <code><a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></code>, and a new supply
</p></div></div><div class="top"><p class="src"><a name="v:mkSplitUniqSupply" class="def">mkSplitUniqSupply</a> :: <a href="../base-4.5.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></p><div class="doc"><p>Create a unique supply out of thin air. The character given must
 be distinct from those of all calls to this function in the compiler
 for the values generated to be truly unique.
</p></div></div><div class="top"><p class="src"><a name="v:splitUniqSupply" class="def">splitUniqSupply</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; (<a href="UniqSupply.html#t:UniqSupply">UniqSupply</a>, <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a>)</p><div class="doc"><p>Build two <code><a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></code> from a single one, each of which
 can supply its own <code><a href="Unique.html#t:Unique">Unique</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:listSplitUniqSupply" class="def">listSplitUniqSupply</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; [<a href="UniqSupply.html#t:UniqSupply">UniqSupply</a>]</p><div class="doc"><p>Create an infinite list of <code><a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></code> from a single one
</p></div></div><h1 id="g:3">Unique supply monad and its abstraction
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:UniqSM" class="def">UniqSM</a> result </p><div class="doc"><p>A monad which just gives the ability to obtain <code><a href="Unique.html#t:Unique">Unique</a></code>s
</p></div><div class="subs instances"><p id="control.i:UniqSM" class="caption collapser" onclick="toggleSection('i:UniqSM')">Instances</p><div id="section.i:UniqSM" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> <a href="UniqSupply.html#t:UniqSM">UniqSM</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Control-Monad.html#t:Functor">Functor</a> <a href="UniqSupply.html#t:UniqSM">UniqSM</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="MonadUtils.html#t:MonadFix">MonadFix</a> <a href="UniqSupply.html#t:UniqSM">UniqSM</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="MonadUtils.html#t:Applicative">Applicative</a> <a href="UniqSupply.html#t:UniqSM">UniqSM</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="UniqSupply.html#t:MonadUnique">MonadUnique</a> <a href="UniqSupply.html#t:UniqSM">UniqSM</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a name="t:MonadUnique" class="def">MonadUnique</a> m  <span class="keyword">where</span></p><div class="doc"><p>A monad for generating unique identifiers
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:getUniqueSupplyM" class="def">getUniqueSupplyM</a> :: m <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></p><div class="doc"><p>Get a new UniqueSupply
</p></div><p class="src"><a name="v:getUniqueM" class="def">getUniqueM</a> :: m <a href="Unique.html#t:Unique">Unique</a></p><div class="doc"><p>Get a new unique identifier
</p></div><p class="src"><a name="v:getUniquesM" class="def">getUniquesM</a> :: m [<a href="Unique.html#t:Unique">Unique</a>]</p><div class="doc"><p>Get an infinite list of new unique identifiers
</p></div></div><div class="subs instances"><p id="control.i:MonadUnique" class="caption collapser" onclick="toggleSection('i:MonadUnique')">Instances</p><div id="section.i:MonadUnique" class="show"><table><tr><td class="src"><a href="UniqSupply.html#t:MonadUnique">MonadUnique</a> <a href="UniqSupply.html#t:UniqSM">UniqSM</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="UniqSupply.html#t:MonadUnique">MonadUnique</a> <a href="OptimizationFuel.html#t:FuelUniqSM">FuelUniqSM</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="UniqSupply.html#t:MonadUnique">MonadUnique</a> <a href="CoreMonad.html#t:CoreM">CoreM</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="UniqSupply.html#t:MonadUnique">MonadUnique</a> <a href="SimplMonad.html#t:SimplM">SimplM</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="UniqSupply.html#t:MonadUnique">MonadUnique</a> (<a href="IOEnv.html#t:IOEnv">IOEnv</a> (<a href="TcRnTypes.html#t:Env">Env</a> gbl lcl))</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:4">Operations on the monad
</h2><div class="top"><p class="src"><a name="v:initUs" class="def">initUs</a> ::  <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> a -&gt; (a, <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a>)</p><div class="doc"><p>Run the <code><a href="UniqSupply.html#t:UniqSM">UniqSM</a></code> action, returning the final <code><a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:initUs_" class="def">initUs_</a> ::  <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a> -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> a -&gt; a</p><div class="doc"><p>Run the <code><a href="UniqSupply.html#t:UniqSM">UniqSM</a></code> action, discarding the final <code><a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:lazyThenUs" class="def">lazyThenUs</a> ::  <a href="UniqSupply.html#t:UniqSM">UniqSM</a> a -&gt; (a -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b) -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b</p></div><div class="top"><p class="src"><a name="v:lazyMapUs" class="def">lazyMapUs</a> ::  (a -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b) -&gt; [a] -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> [b]</p></div><h2 id="g:5">Deprecated operations on <code><a href="UniqSupply.html#t:UniqSM">UniqSM</a></code>
</h2><div class="top"><p class="src"><a name="v:getUniqueUs" class="def">getUniqueUs</a> :: <a href="UniqSupply.html#t:UniqSM">UniqSM</a> <a href="Unique.html#t:Unique">Unique</a></p></div><div class="top"><p class="src"><a name="v:getUs" class="def">getUs</a> :: <a href="UniqSupply.html#t:UniqSM">UniqSM</a> <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></p></div><div class="top"><p class="src"><a name="v:returnUs" class="def">returnUs</a> ::  a -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> a</p></div><div class="top"><p class="src"><a name="v:thenUs" class="def">thenUs</a> ::  <a href="UniqSupply.html#t:UniqSM">UniqSM</a> a -&gt; (a -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b) -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b</p></div><div class="top"><p class="src"><a name="v:mapUs" class="def">mapUs</a> ::  (a -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> b) -&gt; [a] -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> [b]</p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>