/usr/share/doc/libghc-monoid-subclasses-doc/html/Data-Monoid-Instances-Stateful.html is in libghc-monoid-subclasses-doc 0.4.1.2-3build1.
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 | <!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>Data.Monoid.Instances.Stateful</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_Data-Monoid-Instances-Stateful.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Monoid-Instances-Stateful.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">monoid-subclasses-0.4.1.2: Subclasses of Monoid</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Data.Monoid.Instances.Stateful</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module defines the monoid transformer data type <code><a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a></code>.</p><pre>> let s = setState [4] $ pure "data" :: Stateful [Int] String
> s
Stateful ("data",[4])
> factors s
[Stateful ("d",[]),Stateful ("a",[]),Stateful ("t",[]),Stateful ("a",[]),Stateful ("",[4])]</pre></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">newtype</span> <a href="#t:Stateful">Stateful</a> a b = <a href="#v:Stateful">Stateful</a> (b, a)</li><li class="src short"><a href="#v:extract">extract</a> :: <a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b -> b</li><li class="src short"><a href="#v:state">state</a> :: <a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b -> a</li><li class="src short"><a href="#v:setState">setState</a> :: a -> <a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b -> <a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:Stateful" class="def">Stateful</a> a b <a href="src/Data-Monoid-Instances-Stateful.html#Stateful" class="link">Source</a></p><div class="doc"><p><code><code><a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a></code> a b</code> is a wrapper around the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a></code> <code>b</code> that carries the state <code>a</code> along. The state type <code>a</code> must be
a monoid as well if <code><a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a></code> is to be of any use. In the <code><a href="Data-Monoid-Factorial.html#t:FactorialMonoid">FactorialMonoid</a></code> and <code><a href="Data-Monoid-Textual.html#t:TextualMonoid">TextualMonoid</a></code> class instances, the
monoid <code>b</code> has the priority and the state <code>a</code> is left for the end.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Stateful" class="def">Stateful</a> (b, a)</td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:Stateful" class="caption collapser" onclick="toggleSection('i:Stateful')">Instances</p><div id="section.i:Stateful" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-51" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-54" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> b) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-40" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> b) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-40" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> b) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-40" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:IsString">IsString</a> b) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:IsString">IsString</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-139" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a> b) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-58" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Monoid-Null.html#t:PositiveMonoid">PositiveMonoid</a> a, <a href="Data-Monoid-Null.html#t:PositiveMonoid">PositiveMonoid</a> b) => <a href="Data-Monoid-Null.html#t:PositiveMonoid">PositiveMonoid</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-68" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Monoid-Null.html#t:MonoidNull">MonoidNull</a> a, <a href="Data-Monoid-Null.html#t:MonoidNull">MonoidNull</a> b) => <a href="Data-Monoid-Null.html#t:MonoidNull">MonoidNull</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-64" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Monoid-Factorial.html#t:StableFactorialMonoid">StableFactorialMonoid</a> a, <a href="Data-Monoid-Factorial.html#t:StableFactorialMonoid">StableFactorialMonoid</a> b) => <a href="Data-Monoid-Factorial.html#t:StableFactorialMonoid">StableFactorialMonoid</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-137" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Monoid-Factorial.html#t:FactorialMonoid">FactorialMonoid</a> a, <a href="Data-Monoid-Factorial.html#t:FactorialMonoid">FactorialMonoid</a> b) => <a href="Data-Monoid-Factorial.html#t:FactorialMonoid">FactorialMonoid</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-93" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Monoid-Cancellative.html#t:RightGCDMonoid">RightGCDMonoid</a> a, <a href="Data-Monoid-Cancellative.html#t:RightGCDMonoid">RightGCDMonoid</a> b) => <a href="Data-Monoid-Cancellative.html#t:RightGCDMonoid">RightGCDMonoid</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-89" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Monoid-Cancellative.html#t:LeftGCDMonoid">LeftGCDMonoid</a> a, <a href="Data-Monoid-Cancellative.html#t:LeftGCDMonoid">LeftGCDMonoid</a> b) => <a href="Data-Monoid-Cancellative.html#t:LeftGCDMonoid">LeftGCDMonoid</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-82" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Monoid-Cancellative.html#t:RightReductiveMonoid">RightReductiveMonoid</a> a, <a href="Data-Monoid-Cancellative.html#t:RightReductiveMonoid">RightReductiveMonoid</a> b) => <a href="Data-Monoid-Cancellative.html#t:RightReductiveMonoid">RightReductiveMonoid</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-76" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Monoid-Cancellative.html#t:LeftReductiveMonoid">LeftReductiveMonoid</a> a, <a href="Data-Monoid-Cancellative.html#t:LeftReductiveMonoid">LeftReductiveMonoid</a> b) => <a href="Data-Monoid-Cancellative.html#t:LeftReductiveMonoid">LeftReductiveMonoid</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-70" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Monoid-Cancellative.html#t:LeftGCDMonoid">LeftGCDMonoid</a> a, <a href="Data-Monoid-Factorial.html#t:FactorialMonoid">FactorialMonoid</a> a, <a href="Data-Monoid-Textual.html#t:TextualMonoid">TextualMonoid</a> b) => <a href="Data-Monoid-Textual.html#t:TextualMonoid">TextualMonoid</a> (<a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b)</span> <a href="src/Data-Monoid-Instances-Stateful.html#line-142" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:extract" class="def">extract</a> :: <a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b -> b <a href="src/Data-Monoid-Instances-Stateful.html#extract" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:state" class="def">state</a> :: <a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b -> a <a href="src/Data-Monoid-Instances-Stateful.html#state" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:setState" class="def">setState</a> :: a -> <a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b -> <a href="Data-Monoid-Instances-Stateful.html#t:Stateful">Stateful</a> a b <a href="src/Data-Monoid-Instances-Stateful.html#setState" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|