Repository navigation
Expand file tree
/
Copy pathLanguage-Copilot-Core.html
More file actions
75 lines (75 loc) · 68.5 KB
/
Copy pathLanguage-Copilot-Core.html
File metadata and controls
75 lines (75 loc) · 68.5 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!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>Language.Copilot.Core</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_Language-Copilot-Core.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="http://github.com/leepike/Copilot/Language.Copilot.Core.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">copilot-0.28: A stream DSL for writing embedded C monitors.</p></div><div id="content"><div id="module-header"><p class="caption">Language.Copilot.Core</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#1">Type hierarchy for the copilot language
</a></li><li><a href="#2">General functions on <code><a href="Language-Copilot-Core.html#t:Streams">Streams</a></code> and <code><a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a></code>
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Provides basic types and functions for other parts of <em>Copilot</em>.
</p><p>If you wish to add a new type, you need to make it an instance of <code><code><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a></code></code>,
to add it to <code><code><a href="Language-Copilot-Core.html#v:foldStreamableMaps">foldStreamableMaps</a></code></code>, <code><code><a href="Language-Copilot-Core.html#v:mapStreamableMaps">mapStreamableMaps</a></code></code>, and optionnaly
to add an ext[Type], a [type] and a var[Type]
functions in Language.hs to make it easier to use.
</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">type</span> <a href="#t:Var">Var</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Name">Name</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Period">Period</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Phase">Phase</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Port">Port</a> = <a href="#v:Port">Port</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Spec">Spec</a> a <span class="keyword">where</span><ul class="subs"><li><a href="#v:Var">Var</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a </li><li><a href="#v:Const">Const</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => a -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a </li><li><a href="#v:PVar">PVar</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => Type -> <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a </li><li><a href="#v:PArr">PArr</a> :: (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> b, IntegralE b) => Type -> (<a href="Language-Copilot-Core.html#t:Var">Var</a>, <a href="Language-Copilot-Core.html#t:Spec">Spec</a> b) -> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a </li><li><a href="#v:F">F</a> :: (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> b) => (b -> a) -> (E b -> E a) -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> b -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a </li><li><a href="#v:F2">F2</a> :: (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> b, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> c) => (b -> c -> a) -> (E b -> E c -> E a) -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> b -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> c -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a </li><li><a href="#v:F3">F3</a> :: (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> b, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> c, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> d) => (b -> c -> d -> a) -> (E b -> E c -> E d -> E a) -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> b -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> c -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> d -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a </li><li><a href="#v:Append">Append</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => [a] -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a </li><li><a href="#v:Drop">Drop</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int">Int</a> -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a </li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:Streams">Streams</a> = Writer <a href="Language-Copilot-Core.html#t:LangElems">LangElems</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Stream">Stream</a> a = <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => (<a href="Language-Copilot-Core.html#t:Var">Var</a>, <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a)</li><li class="src short"><span class="keyword">data</span> <a href="#t:Send">Send</a> a = <a href="#v:Send">Send</a> {<ul class="subs"><li><a href="#v:sendVar">sendVar</a> :: <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a</li><li><a href="#v:sendPh">sendPh</a> :: <a href="Language-Copilot-Core.html#t:Phase">Phase</a></li><li><a href="#v:sendPort">sendPort</a> :: <a href="Language-Copilot-Core.html#t:Port">Port</a></li><li><a href="#v:sendName">sendName</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:Trigger">Trigger</a> = <a href="#v:Trigger">Trigger</a> {<ul class="subs"><li><a href="#v:trigVar">trigVar</a> :: <a href="Language-Copilot-Core.html#t:Spec">Spec</a> <a href="Language-Copilot-Language.html#t:Bool">Bool</a></li><li><a href="#v:trigName">trigName</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></li><li><a href="#v:trigArgs">trigArgs</a> :: ([<a href="Language-Copilot-Core.html#t:Var">Var</a>], <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a>)</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:Triggers">Triggers</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a> <a href="Language-Copilot-Core.html#t:Trigger">Trigger</a></li><li class="src short"><a href="#v:notVarErr">notVarErr</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a -> (<a href="Language-Copilot-Core.html#t:Var">Var</a> -> b) -> b</li><li class="src short"><span class="keyword">data</span> <a href="#t:LangElems">LangElems</a> = <a href="#v:LangElems">LangElems</a> {<ul class="subs"><li><a href="#v:strms">strms</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a></li><li><a href="#v:snds">snds</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Send">Send</a></li><li><a href="#v:trigs">trigs</a> :: <a href="Language-Copilot-Core.html#t:Triggers">Triggers</a></li></ul>}</li><li class="src short"><span class="keyword">class</span> (Expr a, Assign a, <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> a) => <a href="#t:Streamable">Streamable</a> a <span class="keyword">where</span><ul class="subs"><li><a href="#v:getSubMap">getSubMap</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> b -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (b a)</li><li><a href="#v:updateSubMap">updateSubMap</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (b a) -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (b a)) -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> b -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> b</li><li><a href="#v:unit">unit</a> :: a</li><li><a href="#v:atomConstructor">atomConstructor</a> :: <a href="Language-Copilot-Core.html#t:Var">Var</a> -> a -> Atom (V a)</li><li><a href="#v:externalAtomConstructor">externalAtomConstructor</a> :: <a href="Language-Copilot-Core.html#t:Var">Var</a> -> V a</li><li><a href="#v:typeId">typeId</a> :: a -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></li><li><a href="#v:typeIdPrec">typeIdPrec</a> :: a -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></li><li><a href="#v:atomType">atomType</a> :: a -> Type</li><li><a href="#v:showAsC">showAsC</a> :: a -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></li></ul></li><li class="src short"><a href="#v:mkSend">mkSend</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => E a -> <a href="Language-Copilot-Core.html#t:Port">Port</a> -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a> -> Atom <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:StreamableMaps">StreamableMaps</a> a = <a href="#v:SM">SM</a> {<ul class="subs"><li><a href="#v:bMap">bMap</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="Language-Copilot-Language.html#t:Bool">Bool</a>)</li><li><a href="#v:i8Map">i8Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int8">Int8</a>)</li><li><a href="#v:i16Map">i16Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int16">Int16</a>)</li><li><a href="#v:i32Map">i32Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int32">Int32</a>)</li><li><a href="#v:i64Map">i64Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int64">Int64</a>)</li><li><a href="#v:w8Map">w8Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word8">Word8</a>)</li><li><a href="#v:w16Map">w16Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word16">Word16</a>)</li><li><a href="#v:w32Map">w32Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word32">Word32</a>)</li><li><a href="#v:w64Map">w64Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word64">Word64</a>)</li><li><a href="#v:fMap">fMap</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t:Float">Float</a>)</li><li><a href="#v:dMap">dMap</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t:Double">Double</a>)</li></ul>}</li><li class="src short"><a href="#v:emptySM">emptySM</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> a</li><li class="src short"><a href="#v:isEmptySM">isEmptySM</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> a -> <a href="Language-Copilot-Language.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:getMaybeElem">getMaybeElem</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> b -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t:Maybe">Maybe</a> (b a)</li><li class="src short"><a href="#v:getElem">getElem</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> b -> b a</li><li class="src short"><a href="#v:foldStreamableMaps">foldStreamableMaps</a> :: <span class="keyword">forall</span> b c. (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> c a -> b -> b) -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> c -> b -> b</li><li class="src short"><a href="#v:mapStreamableMaps">mapStreamableMaps</a> :: <span class="keyword">forall</span> s s'. (<span class="keyword">forall</span> a. <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> s a -> s' a) -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> s -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> s'</li><li class="src short"><a href="#v:mapStreamableMapsM">mapStreamableMapsM</a> :: <span class="keyword">forall</span> s s' m. <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Control-Monad.html#t:Monad">Monad</a> m => (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> s a -> m (s' a)) -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> s -> m (<a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> s')</li><li class="src short"><a href="#v:filterStreamableMaps">filterStreamableMaps</a> :: <span class="keyword">forall</span> c b. <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> c -> [(Type, <a href="Language-Copilot-Core.html#t:Var">Var</a>, b)] -> (<a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> c, <a href="Language-Copilot-Language.html#t:Bool">Bool</a>)</li><li class="src short"><a href="#v:normalizeVar">normalizeVar</a> :: <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:Var">Var</a></li><li class="src short"><a href="#v:getVars">getVars</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> s -> [<a href="Language-Copilot-Core.html#t:Var">Var</a>]</li><li class="src short"><span class="keyword">type</span> <a href="#t:Vars">Vars</a> = <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> []</li><li class="src short"><span class="keyword">data</span> <a href="#t:BoundedArray">BoundedArray</a> a = <a href="#v:B">B</a> ArrIndex (<a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t:Maybe">Maybe</a> (A a))</li><li class="src short"><a href="#v:nextSt">nextSt</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> -> <a href="Language-Copilot-Core.html#t:ProphArrs">ProphArrs</a> -> <a href="Language-Copilot-Core.html#t:TmpSamples">TmpSamples</a> -> <a href="Language-Copilot-Core.html#t:Indexes">Indexes</a> -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a -> ArrIndex -> E a</li><li class="src short"><span class="keyword">type</span> <a href="#t:Outputs">Outputs</a> = <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> V</li><li class="src short"><span class="keyword">data</span> <a href="#t:TmpSamples">TmpSamples</a> = <a href="#v:TmpSamples">TmpSamples</a> {<ul class="subs"><li><a href="#v:tmpVars">tmpVars</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:PhasedValueVar">PhasedValueVar</a></li><li><a href="#v:tmpArrs">tmpArrs</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:PhasedValueArr">PhasedValueArr</a></li><li><a href="#v:tmpIdxs">tmpIdxs</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:PhasedValueIdx">PhasedValueIdx</a></li></ul>}</li><li class="src short"><a href="#v:emptyTmpSamples">emptyTmpSamples</a> :: <a href="Language-Copilot-Core.html#t:TmpSamples">TmpSamples</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:ProphArrs">ProphArrs</a> = <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:BoundedArray">BoundedArray</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Indexes">Indexes</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (V ArrIndex)</li><li class="src short"><span class="keyword">data</span> <a href="#t:PhasedValueVar">PhasedValueVar</a> a = <a href="#v:PhV">PhV</a> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> (V a)</li><li class="src short"><span class="keyword">data</span> <a href="#t:PhasedValueArr">PhasedValueArr</a> a = <a href="#v:PhA">PhA</a> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> (V a)</li><li class="src short"><span class="keyword">data</span> <a href="#t:PhasedValueIdx">PhasedValueIdx</a> a = <a href="#v:PhIdx">PhIdx</a> (E a)</li><li class="src short"><a href="#v:tmpVarName">tmpVarName</a> :: <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> -> <a href="Language-Copilot-Core.html#t:Var">Var</a></li><li class="src short"><a href="#v:tmpArrName">tmpArrName</a> :: <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a> -> <a href="Language-Copilot-Core.html#t:Var">Var</a></li><li class="src short"><a href="#v:getAtomType">getAtomType</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a -> Type</li><li class="src short"><a href="#v:getSpecs">getSpecs</a> :: <a href="Language-Copilot-Core.html#t:Streams">Streams</a> -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a></li><li class="src short"><a href="#v:getSends">getSends</a> :: <a href="Language-Copilot-Core.html#t:Streams">Streams</a> -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Send">Send</a></li><li class="src short"><a href="#v:getTriggers">getTriggers</a> :: <a href="Language-Copilot-Core.html#t:Streams">Streams</a> -> <a href="Language-Copilot-Core.html#t:Triggers">Triggers</a></li><li class="src short"><a href="#v:makeTrigger">makeTrigger</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> -> <a href="Language-Copilot-Core.html#t:ProphArrs">ProphArrs</a> -> <a href="Language-Copilot-Core.html#t:TmpSamples">TmpSamples</a> -> <a href="Language-Copilot-Core.html#t:Indexes">Indexes</a> -> <a href="Language-Copilot-Core.html#t:Trigger">Trigger</a> -> Atom <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a> -> Atom <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li></ul></div><div id="interface"><h1 id="1">Type hierarchy for the copilot language
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Var" class="def">Var</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></p><div class="doc"><p>Names of the streams or external variables
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Name" class="def">Name</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></p><div class="doc"><p>C file name
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Period" class="def">Period</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int">Int</a></p><div class="doc"><p>Atom period
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Phase" class="def">Phase</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int">Int</a></p><div class="doc"><p>Phase of an Atom phase
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Port" class="def">Port</a> </p><div class="doc"><p>Port over which to broadcast information
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Port" class="def">Port</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int">Int</a></td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Spec" class="def">Spec</a> a <span class="keyword">where</span></p><div class="doc"><p>Specification of a stream, parameterized by the type of the values of the stream.
The only requirement on <code>a</code> is that it should be <code><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a></code>.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Var" class="def">Var</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Const" class="def">Const</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => a -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PVar" class="def">PVar</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => Type -> <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:PArr" class="def">PArr</a> :: (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> b, IntegralE b) => Type -> (<a href="Language-Copilot-Core.html#t:Var">Var</a>, <a href="Language-Copilot-Core.html#t:Spec">Spec</a> b) -> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:F" class="def">F</a> :: (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> b) => (b -> a) -> (E b -> E a) -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> b -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:F2" class="def">F2</a> :: (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> b, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> c) => (b -> c -> a) -> (E b -> E c -> E a) -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> b -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> c -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:F3" class="def">F3</a> :: (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> b, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> c, <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> d) => (b -> c -> d -> a) -> (E b -> E c -> E d -> E a) -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> b -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> c -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> d -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Append" class="def">Append</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => [a] -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Drop" class="def">Drop</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int">Int</a> -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a</td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:Spec" class="caption collapser" onclick="toggleSection('i:Spec')">Instances</p><div id="section.i:Spec" class="show"><table><tr><td class="src"><a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Eq.html#t:Eq">Eq</a> a => <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Eq.html#t:Eq">Eq</a> (<a href="Language-Copilot-Core.html#t:Spec">Spec</a> a)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a, NumE a, <a href="Language-Copilot-Language.html#t:Fractional">Fractional</a> a) => <a href="Language-Copilot-Language.html#t:Fractional">Fractional</a> (<a href="Language-Copilot-Core.html#t:Spec">Spec</a> a)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a, NumE a) => <a href="Language-Copilot-Language.html#t:Num">Num</a> (<a href="Language-Copilot-Core.html#t:Spec">Spec</a> a)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> a => <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (<a href="Language-Copilot-Core.html#t:Spec">Spec</a> a)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a>)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Streams" class="def">Streams</a> = Writer <a href="Language-Copilot-Core.html#t:LangElems">LangElems</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></p><div class="doc"><p>Container for mutually recursive streams, whose specifications may be
parameterized by different types
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Stream" class="def">Stream</a> a = <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => (<a href="Language-Copilot-Core.html#t:Var">Var</a>, <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a)</p><div class="doc"><p>A named stream
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Send" class="def">Send</a> a </p><div class="doc"><p>An instruction to send data on a port at a given phase. Uses a phantom type.
data Send a = Sendable a => Send (Var, Phase, Port)
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Send" class="def">Send</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:sendVar" class="def">sendVar</a> :: <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:sendPh" class="def">sendPh</a> :: <a href="Language-Copilot-Core.html#t:Phase">Phase</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:sendPort" class="def">sendPort</a> :: <a href="Language-Copilot-Core.html#t:Port">Port</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:sendName" class="def">sendName</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Send" class="caption collapser" onclick="toggleSection('i:Send')">Instances</p><div id="section.i:Send" class="show"><table><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (<a href="Language-Copilot-Core.html#t:Send">Send</a> a)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Trigger" class="def">Trigger</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Trigger" class="def">Trigger</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:trigVar" class="def">trigVar</a> :: <a href="Language-Copilot-Core.html#t:Spec">Spec</a> <a href="Language-Copilot-Language.html#t:Bool">Bool</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:trigName" class="def">trigName</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:trigArgs" class="def">trigArgs</a> :: ([<a href="Language-Copilot-Core.html#t:Var">Var</a>], <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a>)</dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Trigger" class="caption collapser" onclick="toggleSection('i:Trigger')">Instances</p><div id="section.i:Trigger" class="show"><table><tr><td class="src"><a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> <a href="Language-Copilot-Core.html#t:Trigger">Trigger</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Triggers" class="def">Triggers</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a> <a href="Language-Copilot-Core.html#t:Trigger">Trigger</a></p></div><div class="top"><p class="src"><a name="v:notVarErr" class="def">notVarErr</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a -> (<a href="Language-Copilot-Core.html#t:Var">Var</a> -> b) -> b</p><div class="doc"><p>If the <code><a href="Language-Copilot-Core.html#t:Spec">Spec</a></code> isn't a <code><a href="Language-Copilot-Core.html#t:Var">Var</a></code>, then throw an error; otherwise, apply the
function.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LangElems" class="def">LangElems</a> </p><div class="doc"><p>Holds all the different kinds of language elements that are pushed into the
Writer monad. This currently includes the actual specs, <a href="send.html">send</a> directives,
and trigger directives. (Use the functions in Language.hs to make sends and
triggers.)
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LangElems" class="def">LangElems</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:strms" class="def">strms</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:snds" class="def">snds</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Send">Send</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:trigs" class="def">trigs</a> :: <a href="Language-Copilot-Core.html#t:Triggers">Triggers</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:LangElems" class="caption collapser" onclick="toggleSection('i:LangElems')">Instances</p><div id="section.i:LangElems" class="show"><table><tr><td class="src"><a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Monoid.html#t:Monoid">Monoid</a> <a href="Language-Copilot-Core.html#t:LangElems">LangElems</a></td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="2">General functions on <code><a href="Language-Copilot-Core.html#t:Streams">Streams</a></code> and <code><a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a></code>
</h1><div class="top"><p class="src"><span class="keyword">class</span> (Expr a, Assign a, <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> a) => <a name="t:Streamable" class="def">Streamable</a> a <span class="keyword">where</span></p><div class="doc"><p>Holds the complete specification of a distributed monitor
type DistributedStreams = (Streams, Sends)
</p><p>A type is streamable iff a stream may emit values of that type
</p><p>There are very strong links between <code><code><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a></code></code> and <code><code><a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a></code></code> :
the types aggregated in <code><code><a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a></code></code> are exactly the <code><code><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a></code></code>
types and that invariant should be kept (see methods)
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:getSubMap" class="def">getSubMap</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> b -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (b a)</p><div class="doc"><p>Provides access to the Map in a StreamableMaps which store values
of the good type
</p></div><p class="src"><a name="v:updateSubMap" class="def">updateSubMap</a> :: (<a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (b a) -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (b a)) -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> b -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> b</p><div class="doc"><p>Provides a way to modify (mostly used for insertions) the Map in a
StreamableMaps which store values of the good type
</p></div><p class="src"><a name="v:unit" class="def">unit</a> :: a</p><div class="doc"><p>A default value for the type <code>a</code>. Its value is not important.
</p></div><p class="src"><a name="v:atomConstructor" class="def">atomConstructor</a> :: <a href="Language-Copilot-Core.html#t:Var">Var</a> -> a -> Atom (V a)</p><div class="doc"><p>A constructor to produce an <code>Atom</code> value
</p></div><p class="src"><a name="v:externalAtomConstructor" class="def">externalAtomConstructor</a> :: <a href="Language-Copilot-Core.html#t:Var">Var</a> -> V a</p><div class="doc"><p>A constructor to get an <code>Atom</code> value from an external variable
</p></div><p class="src"><a name="v:typeId" class="def">typeId</a> :: a -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></p><div class="doc"><p>The argument only coerces the type, it is discarded. Returns the
format for outputting a value of this type with printf in C
</p><p>For example <a href="%f.html">%f</a> for a float
</p></div><p class="src"><a name="v:typeIdPrec" class="def">typeIdPrec</a> :: a -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></p><div class="doc"><p>The same, only adds the wanted precision for floating points.
</p></div><p class="src"><a name="v:atomType" class="def">atomType</a> :: a -> Type</p><div class="doc"><p>The argument only coerces the type, it is discarded.
Returns the corresponding <em>Atom</em> type.
</p></div><p class="src"><a name="v:showAsC" class="def">showAsC</a> :: a -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a></p><div class="doc"><p>Like Show, except that the formatting is exactly the same as the one of
C for example the booleans are first converted to 0 or 1, and floats and
doubles have the good precision.
</p></div></div><div class="subs instances"><p id="control.i:Streamable" class="caption collapser" onclick="toggleSection('i:Streamable')">Instances</p><div id="section.i:Streamable" class="show"><table><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> <a href="Language-Copilot-Language.html#t:Bool">Bool</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t:Double">Double</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t:Float">Float</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word8">Word8</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word16">Word16</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word32">Word32</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word64">Word64</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mkSend" class="def">mkSend</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => E a -> <a href="Language-Copilot-Core.html#t:Port">Port</a> -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a> -> Atom <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></p><div class="doc"><p>Sending data over ports.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:StreamableMaps" class="def">StreamableMaps</a> a </p><div class="doc"><p>This is a generalization of <code><code><a href="Language-Copilot-Core.html#t:Streams">Streams</a></code></code>
which is used for storing Maps over values parameterized by different types.
</p><p>It is extensively used in the internals of Copilot, in conjunction with
<code><code><a href="Language-Copilot-Core.html#v:foldStreamableMaps">foldStreamableMaps</a></code></code> and <code><code><a href="Language-Copilot-Core.html#v:mapStreamableMaps">mapStreamableMaps</a></code></code>
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:SM" class="def">SM</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:bMap" class="def">bMap</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="Language-Copilot-Language.html#t:Bool">Bool</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:i8Map" class="def">i8Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int8">Int8</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:i16Map" class="def">i16Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int16">Int16</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:i32Map" class="def">i32Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int32">Int32</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:i64Map" class="def">i64Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int64">Int64</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:w8Map" class="def">w8Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word8">Word8</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:w16Map" class="def">w16Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word16">Word16</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:w32Map" class="def">w32Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word32">Word32</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:w64Map" class="def">w64Map</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word64">Word64</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:fMap" class="def">fMap</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t:Float">Float</a>)</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:dMap" class="def">dMap</a> :: <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t:Double">Double</a>)</dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:StreamableMaps" class="caption collapser" onclick="toggleSection('i:StreamableMaps')">Instances</p><div id="section.i:StreamableMaps" class="show"><table><tr><td class="src">(<a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (a <a href="Language-Copilot-Language.html#t:Bool">Bool</a>), <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int8">Int8</a>), <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int16">Int16</a>), <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int32">Int32</a>), <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t:Int64">Int64</a>), <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word8">Word8</a>), <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word16">Word16</a>), <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word32">Word32</a>), <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Word.html#t:Word64">Word64</a>), <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t:Float">Float</a>), <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (a <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t:Double">Double</a>)) => <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t:Show">Show</a> (<a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> a)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a>)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:emptySM" class="def">emptySM</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> a</p><div class="doc"><p>An empty streamableMaps.
</p></div></div><div class="top"><p class="src"><a name="v:isEmptySM" class="def">isEmptySM</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> a -> <a href="Language-Copilot-Language.html#t:Bool">Bool</a></p><div class="doc"><p>Verifies if its argument is equal to emptySM
</p></div></div><div class="top"><p class="src"><a name="v:getMaybeElem" class="def">getMaybeElem</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> b -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t:Maybe">Maybe</a> (b a)</p><div class="doc"><p>Lookup into the map of the right type in <code><code><a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a></code></code>
</p></div></div><div class="top"><p class="src"><a name="v:getElem" class="def">getElem</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> b -> b a</p><div class="doc"><p>Lookup into the map of the right type in <code><code><a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a></code></code>
Launch an exception if the index is not in it
</p></div></div><div class="top"><p class="src"><a name="v:foldStreamableMaps" class="def">foldStreamableMaps</a> :: <span class="keyword">forall</span> b c. (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> c a -> b -> b) -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> c -> b -> b</p><div class="doc"><p>This function is used to iterate on all the values in all the maps stored
by a <code><code><a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a></code></code>, accumulating a value over time
</p></div></div><div class="top"><p class="src"><a name="v:mapStreamableMaps" class="def">mapStreamableMaps</a> :: <span class="keyword">forall</span> s s'. (<span class="keyword">forall</span> a. <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> s a -> s' a) -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> s -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> s'</p></div><div class="top"><p class="src"><a name="v:mapStreamableMapsM" class="def">mapStreamableMapsM</a> :: <span class="keyword">forall</span> s s' m. <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Control-Monad.html#t:Monad">Monad</a> m => (<a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Var">Var</a> -> s a -> m (s' a)) -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> s -> m (<a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> s')</p></div><div class="top"><p class="src"><a name="v:filterStreamableMaps" class="def">filterStreamableMaps</a> :: <span class="keyword">forall</span> c b. <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> c -> [(Type, <a href="Language-Copilot-Core.html#t:Var">Var</a>, b)] -> (<a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> c, <a href="Language-Copilot-Language.html#t:Bool">Bool</a>)</p><div class="doc"><p>Only keeps in <code>sm</code> the values whose key+type are in <code>l</code>. Also returns a
bool saying whether all the elements in sm were in l. Works even if some
elements in <code>l</code> are not in <code>sm</code>. Not optimised at all.
</p></div></div><div class="top"><p class="src"><a name="v:normalizeVar" class="def">normalizeVar</a> :: <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:Var">Var</a></p><div class="doc"><p>Replace all accepted special characters by sequences of underscores.
</p></div></div><div class="top"><p class="src"><a name="v:getVars" class="def">getVars</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> s -> [<a href="Language-Copilot-Core.html#t:Var">Var</a>]</p><div class="doc"><p>Get the Copilot variables.
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Vars" class="def">Vars</a> = <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> []</p><div class="doc"><p>For each typed variable, this type holds all its successive values in an infinite list
Beware : each element of one of those lists corresponds to a full <code>Atom</code> period,
not to a single clock tick.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:BoundedArray" class="def">BoundedArray</a> a </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:B" class="def">B</a> ArrIndex (<a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Maybe.html#t:Maybe">Maybe</a> (A a))</td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:nextSt" class="def">nextSt</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> -> <a href="Language-Copilot-Core.html#t:ProphArrs">ProphArrs</a> -> <a href="Language-Copilot-Core.html#t:TmpSamples">TmpSamples</a> -> <a href="Language-Copilot-Core.html#t:Indexes">Indexes</a> -> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a -> ArrIndex -> E a</p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Outputs" class="def">Outputs</a> = <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> V</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TmpSamples" class="def">TmpSamples</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TmpSamples" class="def">TmpSamples</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:tmpVars" class="def">tmpVars</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:PhasedValueVar">PhasedValueVar</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:tmpArrs" class="def">tmpArrs</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:PhasedValueArr">PhasedValueArr</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:tmpIdxs" class="def">tmpIdxs</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:PhasedValueIdx">PhasedValueIdx</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:emptyTmpSamples" class="def">emptyTmpSamples</a> :: <a href="Language-Copilot-Core.html#t:TmpSamples">TmpSamples</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ProphArrs" class="def">ProphArrs</a> = <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:BoundedArray">BoundedArray</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Indexes" class="def">Indexes</a> = <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t:Map">Map</a> <a href="Language-Copilot-Core.html#t:Var">Var</a> (V ArrIndex)</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PhasedValueVar" class="def">PhasedValueVar</a> a </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PhV" class="def">PhV</a> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> (V a)</td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PhasedValueArr" class="def">PhasedValueArr</a> a </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PhA" class="def">PhA</a> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> (V a)</td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PhasedValueIdx" class="def">PhasedValueIdx</a> a </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PhIdx" class="def">PhIdx</a> (E a)</td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:tmpVarName" class="def">tmpVarName</a> :: <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> -> <a href="Language-Copilot-Core.html#t:Var">Var</a></p></div><div class="top"><p class="src"><a name="v:tmpArrName" class="def">tmpArrName</a> :: <a href="Language-Copilot-Core.html#t:Var">Var</a> -> <a href="Language-Copilot-Core.html#t:Phase">Phase</a> -> <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t:String">String</a> -> <a href="Language-Copilot-Core.html#t:Var">Var</a></p></div><div class="top"><p class="src"><a name="v:getAtomType" class="def">getAtomType</a> :: <a href="Language-Copilot-Core.html#t:Streamable">Streamable</a> a => <a href="Language-Copilot-Core.html#t:Spec">Spec</a> a -> Type</p></div><div class="top"><p class="src"><a name="v:getSpecs" class="def">getSpecs</a> :: <a href="Language-Copilot-Core.html#t:Streams">Streams</a> -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a></p></div><div class="top"><p class="src"><a name="v:getSends" class="def">getSends</a> :: <a href="Language-Copilot-Core.html#t:Streams">Streams</a> -> <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Send">Send</a></p></div><div class="top"><p class="src"><a name="v:getTriggers" class="def">getTriggers</a> :: <a href="Language-Copilot-Core.html#t:Streams">Streams</a> -> <a href="Language-Copilot-Core.html#t:Triggers">Triggers</a></p></div><div class="top"><p class="src"><a name="v:makeTrigger" class="def">makeTrigger</a> :: <a href="Language-Copilot-Core.html#t:StreamableMaps">StreamableMaps</a> <a href="Language-Copilot-Core.html#t:Spec">Spec</a> -> <a href="Language-Copilot-Core.html#t:ProphArrs">ProphArrs</a> -> <a href="Language-Copilot-Core.html#t:TmpSamples">TmpSamples</a> -> <a href="Language-Copilot-Core.html#t:Indexes">Indexes</a> -> <a href="Language-Copilot-Core.html#t:Trigger">Trigger</a> -> Atom <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a> -> Atom <a href="/Library/Frameworks/GHC.framework/Versions/612/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></p><div class="doc"><p>To make customer C triggers. Only for Spec Bool (others throw an
error). XXX make them throw errors!
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.8.1</p></div></body></html>