This file is indexed.

/usr/share/doc/libghc-reactive-banana-doc/html/Reactive-Banana-Model.html is in libghc-reactive-banana-doc 0.8.1.2-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
<!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>Reactive.Banana.Model</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_Reactive-Banana-Model.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Reactive-Banana-Model.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">reactive-banana-0.8.1.2: Library for functional reactive programming (FRP).</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>Haskell98</td></tr></table><p class="caption">Reactive.Banana.Model</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Synopsis</a></li><li><a href="#g:2">Description</a></li><li><a href="#g:3">Combinators</a><ul><li><a href="#g:4">Data types</a></li><li><a href="#g:5">Basic</a></li><li><a href="#g:6">Dynamic event switching</a></li></ul></li><li><a href="#g:7">Interpretation</a></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">type</span> <a href="#t:Event">Event</a> a = [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> a]</li><li class="src short"><span class="keyword">data</span> <a href="#t:Behavior">Behavior</a> a</li><li class="src short"><a href="#v:never">never</a> :: <a href="Reactive-Banana-Model.html#t:Event">Event</a> a</li><li class="src short"><a href="#v:filterJust">filterJust</a> :: <a href="Reactive-Banana-Model.html#t:Event">Event</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a</li><li class="src short"><a href="#v:unionWith">unionWith</a> :: (a -&gt; a -&gt; a) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a</li><li class="src short"><a href="#v:mapE">mapE</a> :: (a -&gt; b) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> b</li><li class="src short"><a href="#v:accumE">accumE</a> :: a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> (a -&gt; a) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a</li><li class="src short"><a href="#v:applyE">applyE</a> :: <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> (a -&gt; b) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> b</li><li class="src short"><a href="#v:stepperB">stepperB</a> :: a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a</li><li class="src short"><a href="#v:pureB">pureB</a> :: a -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a</li><li class="src short"><a href="#v:applyB">applyB</a> :: <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> (a -&gt; b) -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> b</li><li class="src short"><a href="#v:mapB">mapB</a> :: (a -&gt; b) -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> b</li><li class="src short"><span class="keyword">type</span> <a href="#t:Moment">Moment</a> a = Time -&gt; a</li><li class="src short"><a href="#v:initialB">initialB</a> :: <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Moment">Moment</a> a</li><li class="src short"><a href="#v:trimE">trimE</a> :: <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Event">Event</a> a))</li><li class="src short"><a href="#v:trimB">trimB</a> :: <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a))</li><li class="src short"><a href="#v:observeE">observeE</a> :: <a href="Reactive-Banana-Model.html#t:Event">Event</a> (<a href="Reactive-Banana-Model.html#t:Moment">Moment</a> a) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a</li><li class="src short"><a href="#v:switchE">switchE</a> :: <a href="Reactive-Banana-Model.html#t:Event">Event</a> (<a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Event">Event</a> a)) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a</li><li class="src short"><a href="#v:switchB">switchB</a> :: <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> (<a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a)) -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a</li><li class="src short"><a href="#v:interpret">interpret</a> :: (<a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Event">Event</a> b)) -&gt; [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> a] -&gt; [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> b]</li></ul></div><div id="interface"><h1 id="g:1">Synopsis</h1><div class="doc"><p>Model implementation of the abstract syntax tree.</p></div><h1 id="g:2">Description</h1><div class="doc"><p>This module contains the model implementation for the primitive combinators
defined <a href="Reactive-Banana-Internal-AST.html">Reactive.Banana.Internal.AST</a>
which in turn are the basis for the official combinators
documented in <a href="Reactive-Banana-Combinators.html">Reactive.Banana.Combinators</a>.</p><p>Look at the source code to make maximal use of this module.
(If there is no link to the source code at every type signature,
then you have to run cabal with --hyperlink-source flag.)</p><p>This model is <em>authoritative</em>: when observed with the <code>interpretModel</code> function,
both the actual implementation and its model <em>must</em> agree on the result.
Note that this must also hold for recursive and partial definitions
(at least in spirit, I'm not going to split hairs over <code>_|_</code> vs <code>\_ -&gt; _|_</code>).</p><p>Concerning time and space complexity, the model is not authoritative, however.
Implementations are free to be much more efficient.</p></div><h1 id="g:3">Combinators</h1><h2 id="g:4">Data types</h2><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Event" class="def">Event</a> a = [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> a] <a href="src/Reactive-Banana-Model.html#Event" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Behavior" class="def">Behavior</a> a <a href="src/Reactive-Banana-Model.html#Behavior" class="link">Source</a></p></div><h2 id="g:5">Basic</h2><div class="top"><p class="src"><a name="v:never" class="def">never</a> :: <a href="Reactive-Banana-Model.html#t:Event">Event</a> a <a href="src/Reactive-Banana-Model.html#never" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:filterJust" class="def">filterJust</a> :: <a href="Reactive-Banana-Model.html#t:Event">Event</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a <a href="src/Reactive-Banana-Model.html#filterJust" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:unionWith" class="def">unionWith</a> :: (a -&gt; a -&gt; a) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a <a href="src/Reactive-Banana-Model.html#unionWith" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:mapE" class="def">mapE</a> :: (a -&gt; b) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> b <a href="src/Reactive-Banana-Model.html#mapE" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:accumE" class="def">accumE</a> :: a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> (a -&gt; a) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a <a href="src/Reactive-Banana-Model.html#accumE" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:applyE" class="def">applyE</a> :: <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> (a -&gt; b) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> b <a href="src/Reactive-Banana-Model.html#applyE" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:stepperB" class="def">stepperB</a> :: a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a <a href="src/Reactive-Banana-Model.html#stepperB" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:pureB" class="def">pureB</a> :: a -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a <a href="src/Reactive-Banana-Model.html#pureB" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:applyB" class="def">applyB</a> :: <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> (a -&gt; b) -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> b <a href="src/Reactive-Banana-Model.html#applyB" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:mapB" class="def">mapB</a> :: (a -&gt; b) -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> b <a href="src/Reactive-Banana-Model.html#mapB" class="link">Source</a></p></div><h2 id="g:6">Dynamic event switching</h2><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Moment" class="def">Moment</a> a = Time -&gt; a <a href="src/Reactive-Banana-Model.html#Moment" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:initialB" class="def">initialB</a> :: <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Moment">Moment</a> a <a href="src/Reactive-Banana-Model.html#initialB" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:trimE" class="def">trimE</a> :: <a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Event">Event</a> a)) <a href="src/Reactive-Banana-Model.html#trimE" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:trimB" class="def">trimB</a> :: <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a)) <a href="src/Reactive-Banana-Model.html#trimB" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:observeE" class="def">observeE</a> :: <a href="Reactive-Banana-Model.html#t:Event">Event</a> (<a href="Reactive-Banana-Model.html#t:Moment">Moment</a> a) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a <a href="src/Reactive-Banana-Model.html#observeE" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:switchE" class="def">switchE</a> :: <a href="Reactive-Banana-Model.html#t:Event">Event</a> (<a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Event">Event</a> a)) -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> a <a href="src/Reactive-Banana-Model.html#switchE" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:switchB" class="def">switchB</a> :: <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Event">Event</a> (<a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a)) -&gt; <a href="Reactive-Banana-Model.html#t:Behavior">Behavior</a> a <a href="src/Reactive-Banana-Model.html#switchB" class="link">Source</a></p></div><h1 id="g:7">Interpretation</h1><div class="top"><p class="src"><a name="v:interpret" class="def">interpret</a> :: (<a href="Reactive-Banana-Model.html#t:Event">Event</a> a -&gt; <a href="Reactive-Banana-Model.html#t:Moment">Moment</a> (<a href="Reactive-Banana-Model.html#t:Event">Event</a> b)) -&gt; [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> a] -&gt; [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> b] <a href="src/Reactive-Banana-Model.html#interpret" 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>