/usr/share/doc/libghc-hxt-doc/html/Control-Arrow-ArrowState.html is in libghc-hxt-doc 9.3.1.1-2build1.
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 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <!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>Control.Arrow.ArrowState</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_Control-Arrow-ArrowState.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Arrow-ArrowState.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">hxt-9.3.1.1: A collection of tools for processing XML with Haskell.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>multi parameter classes and functional depenedencies required</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Uwe Schmidt (uwe\@fh-wedel.de)</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Arrow.ArrowState</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Arrows for managing an explicit state
</p><p>State arrows work similar to state monads.
A state value is threaded through the application of arrows.
</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">class</span> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Arrow.html#t:Arrow">Arrow</a> a => <a href="#t:ArrowState">ArrowState</a> s a | a -> s <span class="keyword">where</span><ul class="subs"><li><a href="#v:changeState">changeState</a> :: (s -> b -> s) -> a b b</li><li><a href="#v:accessState">accessState</a> :: (s -> b -> c) -> a b c</li><li><a href="#v:getState">getState</a> :: a b s</li><li><a href="#v:setState">setState</a> :: a s s</li><li><a href="#v:nextState">nextState</a> :: (s -> s) -> a b s</li></ul></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Arrow.html#t:Arrow">Arrow</a> a => <a name="t:ArrowState" class="def">ArrowState</a> s a | a -> s <span class="keyword">where</span><a href="src/Control-Arrow-ArrowState.html#ArrowState" class="link">Source</a></p><div class="doc"><p>The interface for accessing and changing the state component.
</p><p>Multi parameter classes and functional dependencies are required.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:changeState" class="def">changeState</a> :: (s -> b -> s) -> a b b<a href="src/Control-Arrow-ArrowState.html#changeState" class="link">Source</a></p><div class="doc"><p>change the state of a state arrow by applying a function
for computing a new state from the old and the arrow input.
Result is the arrow input
</p></div><p class="src"><a name="v:accessState" class="def">accessState</a> :: (s -> b -> c) -> a b c<a href="src/Control-Arrow-ArrowState.html#accessState" class="link">Source</a></p><div class="doc"><p>access the state with a function using the arrow input
as data for selecting state components.
</p></div><p class="src"><a name="v:getState" class="def">getState</a> :: a b s<a href="src/Control-Arrow-ArrowState.html#getState" class="link">Source</a></p><div class="doc"><p>read the complete state, ignore arrow input
</p><p>definition: <code> getState = accessState (\ s x -> s) </code>
</p></div><p class="src"><a name="v:setState" class="def">setState</a> :: a s s<a href="src/Control-Arrow-ArrowState.html#setState" class="link">Source</a></p><div class="doc"><p>overwrite the old state
</p><p>definition: <code> setState = changeState (\ s x -> x) </code>
</p></div><p class="src"><a name="v:nextState" class="def">nextState</a> :: (s -> s) -> a b s<a href="src/Control-Arrow-ArrowState.html#nextState" class="link">Source</a></p><div class="doc"><p>change state (and ignore input) and return new state
</p><p>convenience function,
usefull for generating e.g. unique identifiers:
</p><p>example with SLA state list arrows
</p><pre> newId :: SLA Int b String
newId = nextState (+1)
>>>
arr (('#':) . show)
runSLA 0 (newId <+> newId <+> newId) undefined
= ["#1", "#2", "#3"]
</pre></div></div><div class="subs instances"><p id="control.i:ArrowState" class="caption collapser" onclick="toggleSection('i:ArrowState')">Instances</p><div id="section.i:ArrowState" class="show"><table><tr><td class="src"><a href="Control-Arrow-ArrowState.html#t:ArrowState">ArrowState</a> s (<a href="Control-Arrow-StateListArrow.html#t:SLA">SLA</a> s)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Control-Arrow-ArrowState.html#t:ArrowState">ArrowState</a> s (<a href="Control-Arrow-IOStateListArrow.html#t:IOSLA">IOSLA</a> s)</td><td class="doc empty"> </td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|