/usr/share/doc/libghc-lambdahack-doc/html/Game-LambdaHack-Common-Frequency.html is in libghc-lambdahack-doc 0.5.0.0-2build5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | <!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>Game.LambdaHack.Common.Frequency</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Game-LambdaHack-Common-Frequency.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Game-LambdaHack-Common-Frequency.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">LambdaHack-0.5.0.0: A game engine library for roguelike dungeon crawlers</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Game.LambdaHack.Common.Frequency</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">The <code>Frequency</code> type</a></li><li><a href="#g:2">Construction</a></li><li><a href="#g:3">Transformation</a></li><li><a href="#g:4">Consumption</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A list of items with relative frequencies of appearance.</p></div></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:Frequency">Frequency</a> a</li><li class="src short"><a href="#v:uniformFreq">uniformFreq</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> [a] -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a</li><li class="src short"><a href="#v:toFreq">toFreq</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>, a)] -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a</li><li class="src short"><a href="#v:scaleFreq">scaleFreq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a</li><li class="src short"><a href="#v:renameFreq">renameFreq</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a</li><li class="src short"><a href="#v:setFreq">setFreq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a</li><li class="src short"><a href="#v:nullFreq">nullFreq</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:runFrequency">runFrequency</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>, a)]</li><li class="src short"><a href="#v:nameFrequency">nameFrequency</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:maxFreq">maxFreq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a</li><li class="src short"><a href="#v:minFreq">minFreq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a</li><li class="src short"><a href="#v:meanFreq">meanFreq</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></li></ul></div><div id="interface"><h1 id="g:1">The <code>Frequency</code> type</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Frequency" class="def">Frequency</a> a <a href="src/Game-LambdaHack-Common-Frequency.html#Frequency" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></p><div class="doc"><p>The frequency distribution type. Not normalized (operations may
or may not group the same elements and sum their frequencies).
However, elements with zero frequency are removed upon construction.</p><p>The <code>Eq</code> instance compares raw representations, not relative,
normalized frequencies, so operations don't need to preserve
the expected equalities, unless they do some kind of normalization
(see <code>Dice</code>).</p></div><div class="subs instances"><p id="control.i:Frequency" class="caption collapser" onclick="toggleSection('i:Frequency')">Instances</p><div id="section.i:Frequency" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Monad:1" class="instance expander" onclick="toggleSection('i:id:Frequency:Monad:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a></span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-47" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Monad:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(>>=)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> (a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b) -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b <a href="#v:-62--62--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62--62-">(>>)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b <a href="#v:-62--62-" class="selflink">#</a></p><p class="src"><a href="#v:return">return</a> :: a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:return" class="selflink">#</a></p><p class="src"><a href="#v:fail">fail</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:fail" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Functor:2" class="instance expander" onclick="toggleSection('i:id:Frequency:Functor:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a></span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-55" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Functor:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -> b) -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(<$)</a> :: a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Applicative:3" class="instance expander" onclick="toggleSection('i:id:Frequency:Applicative:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a></span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-58" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Applicative:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pure">pure</a> :: a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(<*>)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> (a -> b) -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b <a href="#v:-60--42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-42--62-">(*>)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(<*)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:-60--42-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Foldable:4" class="instance expander" onclick="toggleSection('i:id:Frequency:Foldable:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Foldable.html#t:Foldable">Foldable</a> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a></span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-45" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Foldable:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fold">fold</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> m => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> m -> m <a href="#v:fold" class="selflink">#</a></p><p class="src"><a href="#v:foldMap">foldMap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> m => (a -> m) -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> m <a href="#v:foldMap" class="selflink">#</a></p><p class="src"><a href="#v:foldr">foldr</a> :: (a -> b -> b) -> b -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> b <a href="#v:foldr" class="selflink">#</a></p><p class="src"><a href="#v:foldr-39-">foldr'</a> :: (a -> b -> b) -> b -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> b <a href="#v:foldr-39-" class="selflink">#</a></p><p class="src"><a href="#v:foldl">foldl</a> :: (b -> a -> b) -> b -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> b <a href="#v:foldl" class="selflink">#</a></p><p class="src"><a href="#v:foldl-39-">foldl'</a> :: (b -> a -> b) -> b -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> b <a href="#v:foldl-39-" class="selflink">#</a></p><p class="src"><a href="#v:foldr1">foldr1</a> :: (a -> a -> a) -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> a <a href="#v:foldr1" class="selflink">#</a></p><p class="src"><a href="#v:foldl1">foldl1</a> :: (a -> a -> a) -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> a <a href="#v:foldl1" class="selflink">#</a></p><p class="src"><a href="#v:toList">toList</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> [a] <a href="#v:toList" class="selflink">#</a></p><p class="src"><a href="#v:null">null</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:null" class="selflink">#</a></p><p class="src"><a href="#v:length">length</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="#v:length" class="selflink">#</a></p><p class="src"><a href="#v:elem">elem</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a => a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:elem" class="selflink">#</a></p><p class="src"><a href="#v:maximum">maximum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> a <a href="#v:maximum" class="selflink">#</a></p><p class="src"><a href="#v:minimum">minimum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> a <a href="#v:minimum" class="selflink">#</a></p><p class="src"><a href="#v:sum">sum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> a <a href="#v:sum" class="selflink">#</a></p><p class="src"><a href="#v:product">product</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> a <a href="#v:product" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Traversable:5" class="instance expander" onclick="toggleSection('i:id:Frequency:Traversable:5')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Traversable.html#t:Traversable">Traversable</a> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a></span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-45" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Traversable:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:traverse">traverse</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> f => (a -> f b) -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> f (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b) <a href="#v:traverse" class="selflink">#</a></p><p class="src"><a href="#v:sequenceA">sequenceA</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> (f a) -> f (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a) <a href="#v:sequenceA" class="selflink">#</a></p><p class="src"><a href="#v:mapM">mapM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (a -> m b) -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> m (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> b) <a href="#v:mapM" class="selflink">#</a></p><p class="src"><a href="#v:sequence">sequence</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> (m a) -> m (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a) <a href="#v:sequence" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Alternative:6" class="instance expander" onclick="toggleSection('i:id:Frequency:Alternative:6')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Alternative">Alternative</a> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a></span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-75" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Alternative:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:empty">empty</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:empty" class="selflink">#</a></p><p class="src"><a href="#v:-60--124--62-">(<|>)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:-60--124--62-" class="selflink">#</a></p><p class="src"><a href="#v:some">some</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> [a] <a href="#v:some" class="selflink">#</a></p><p class="src"><a href="#v:many">many</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> [a] <a href="#v:many" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:MonadPlus:7" class="instance expander" onclick="toggleSection('i:id:Frequency:MonadPlus:7')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a></span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-65" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:MonadPlus:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mzero">mzero</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:mzero" class="selflink">#</a></p><p class="src"><a href="#v:mplus">mplus</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:mplus" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Eq:8" class="instance expander" onclick="toggleSection('i:id:Frequency:Eq:8')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a)</span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-45" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Eq:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Ord:9" class="instance expander" onclick="toggleSection('i:id:Frequency:Ord:9')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a)</span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-45" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Ord:9" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Read:10" class="instance expander" onclick="toggleSection('i:id:Frequency:Read:10')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a)</span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-45" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Read:10" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a) <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a) <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Show:11" class="instance expander" onclick="toggleSection('i:id:Frequency:Show:11')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a)</span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-45" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Show:11" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Generic:12" class="instance expander" onclick="toggleSection('i:id:Frequency:Generic:12')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:Generic">Generic</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a)</span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-45" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Generic:12" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="#t:Rep" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a) x <a href="#v:from" class="selflink">#</a></p><p class="src"><a href="#v:to">to</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a) x -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="#v:to" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Binary:13" class="instance expander" onclick="toggleSection('i:id:Frequency:Binary:13')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/binary-0.8.3.0/Data-Binary.html#t:Binary">Binary</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/binary-0.8.3.0/Data-Binary.html#t:Binary">Binary</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a)</span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-81" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Binary:13" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:put">put</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/binary-0.8.3.0/Data-Binary-Put.html#t:Put">Put</a> <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:get">get</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/binary-0.8.3.0/Data-Binary-Get-Internal.html#t:Get">Get</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a) <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:putList">putList</a> :: [<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/binary-0.8.3.0/Data-Binary-Put.html#t:Put">Put</a> <a href="#v:putList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:NFData:14" class="instance expander" onclick="toggleSection('i:id:Frequency:NFData:14')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.2.0/Control-DeepSeq.html#t:NFData">NFData</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.2.0/Control-DeepSeq.html#t:NFData">NFData</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a)</span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-83" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:NFData:14" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:rnf">rnf</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> () <a href="#v:rnf" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Hashable:15" class="instance expander" onclick="toggleSection('i:id:Frequency:Hashable:15')"></span> <a href="file:///usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> a => <a href="file:///usr/share/doc/libghc-hashable-doc/html/Data-Hashable.html#t:Hashable">Hashable</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a)</span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-79" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Hashable:15" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:hashWithSalt">hashWithSalt</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="#v:hashWithSalt" class="selflink">#</a></p><p class="src"><a href="#v:hash">hash</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="#v:hash" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Frequency:Rep:16" class="instance expander" onclick="toggleSection('i:id:Frequency:Rep:16')"></span> <span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a)</span> <a href="src/Game-LambdaHack-Common-Frequency.html#line-40" class="link">Source</a> <a href="#t:Frequency" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Frequency:Rep:16" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> (<a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a) = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:D1">D1</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#v:MetaData">MetaData</a> "Frequency" "Game.LambdaHack.Common.Frequency" "LambdaHack-0.5.0.0-74KPJ5W83IH4twh4vUgyBt" <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#v:False">False</a>) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:C1">C1</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#v:MetaCons">MetaCons</a> "Frequency" <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#v:True">True</a>) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> "runFrequency") <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#v:SourceStrict">SourceStrict</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#v:DecidedStrict">DecidedStrict</a>) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>, a)])) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> "nameFrequency") <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>))))</div></div></td></tr></table></div></div></div><h1 id="g:2">Construction</h1><div class="top"><p class="src"><a id="v:uniformFreq" class="def">uniformFreq</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> [a] -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="src/Game-LambdaHack-Common-Frequency.html#uniformFreq" class="link">Source</a> <a href="#v:uniformFreq" class="selflink">#</a></p><div class="doc"><p>Uniform discrete frequency distribution.</p></div></div><div class="top"><p class="src"><a id="v:toFreq" class="def">toFreq</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>, a)] -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="src/Game-LambdaHack-Common-Frequency.html#toFreq" class="link">Source</a> <a href="#v:toFreq" class="selflink">#</a></p><div class="doc"><p>Takes a name and a list of frequencies and items
into the frequency distribution.</p></div></div><h1 id="g:3">Transformation</h1><div class="top"><p class="src"><a id="v:scaleFreq" class="def">scaleFreq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="src/Game-LambdaHack-Common-Frequency.html#scaleFreq" class="link">Source</a> <a href="#v:scaleFreq" class="selflink">#</a></p><div class="doc"><p>Scale frequency distribution, multiplying it
by a positive integer constant.</p></div></div><div class="top"><p class="src"><a id="v:renameFreq" class="def">renameFreq</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="src/Game-LambdaHack-Common-Frequency.html#renameFreq" class="link">Source</a> <a href="#v:renameFreq" class="selflink">#</a></p><div class="doc"><p>Change the description of the frequency.</p></div></div><div class="top"><p class="src"><a id="v:setFreq" class="def">setFreq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="src/Game-LambdaHack-Common-Frequency.html#setFreq" class="link">Source</a> <a href="#v:setFreq" class="selflink">#</a></p><div class="doc"><p>Set frequency of an element.</p></div></div><h1 id="g:4">Consumption</h1><div class="top"><p class="src"><a id="v:nullFreq" class="def">nullFreq</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Game-LambdaHack-Common-Frequency.html#nullFreq" class="link">Source</a> <a href="#v:nullFreq" class="selflink">#</a></p><div class="doc"><p>Test if the frequency distribution is empty.</p></div></div><div class="top"><p class="src"><a id="v:runFrequency" class="def">runFrequency</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>, a)] <a href="src/Game-LambdaHack-Common-Frequency.html#runFrequency" class="link">Source</a> <a href="#v:runFrequency" class="selflink">#</a></p><div class="doc"><p>give acces to raw frequency values</p></div></div><div class="top"><p class="src"><a id="v:nameFrequency" class="def">nameFrequency</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Game-LambdaHack-Common-Frequency.html#nameFrequency" class="link">Source</a> <a href="#v:nameFrequency" class="selflink">#</a></p><div class="doc"><p>short description for debug, etc.;
keep it lazy, because it's rarely used</p></div></div><div class="top"><p class="src"><a id="v:maxFreq" class="def">maxFreq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a <a href="src/Game-LambdaHack-Common-Frequency.html#maxFreq" class="link">Source</a> <a href="#v:maxFreq" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:minFreq" class="def">minFreq</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a <a href="src/Game-LambdaHack-Common-Frequency.html#minFreq" class="link">Source</a> <a href="#v:minFreq" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:meanFreq" class="def">meanFreq</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="src/Game-LambdaHack-Common-Frequency.html#meanFreq" class="link">Source</a> <a href="#v:meanFreq" class="selflink">#</a></p><div class="doc"><p>Average value of an <code>Int</code> distribution, rounded up to avoid truncating
it in the other code higher up, which would equate 1d0 with 1d1.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|