-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExprType.html
4 lines (4 loc) · 11.5 KB
/
ExprType.html
1
2
3
4
<!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>ExprType</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption empty"> </p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(c) Daniel Rubinstein @2018</td></tr><tr><th>License</th><td>WTFPL</td></tr><tr><th>Maintainer</th><td>[email protected]</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>POSIX</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">ExprType</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Contains the Expr data type as well as useful functions relating to basic use of Expr's.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Expr">Expr</a> a<ul class="subs"><li>= <a href="#v:Add">Add</a> (<a href="ExprType.html#t:Expr">Expr</a> a) (<a href="ExprType.html#t:Expr">Expr</a> a)</li><li>| <a href="#v:Sub">Sub</a> (<a href="ExprType.html#t:Expr">Expr</a> a) (<a href="ExprType.html#t:Expr">Expr</a> a)</li><li>| <a href="#v:Mult">Mult</a> (<a href="ExprType.html#t:Expr">Expr</a> a) (<a href="ExprType.html#t:Expr">Expr</a> a)</li><li>| <a href="#v:Div">Div</a> (<a href="ExprType.html#t:Expr">Expr</a> a) (<a href="ExprType.html#t:Expr">Expr</a> a)</li><li>| <a href="#v:Cos">Cos</a> (<a href="ExprType.html#t:Expr">Expr</a> a)</li><li>| <a href="#v:Sin">Sin</a> (<a href="ExprType.html#t:Expr">Expr</a> a)</li><li>| <a href="#v:Log">Log</a> (<a href="ExprType.html#t:Expr">Expr</a> a)</li><li>| <a href="#v:Exp">Exp</a> (<a href="ExprType.html#t:Expr">Expr</a> a)</li><li>| <a href="#v:Vect">Vect</a> [<a href="ExprType.html#t:Expr">Expr</a> a]</li><li>| <a href="#v:Pow">Pow</a> (<a href="ExprType.html#t:Expr">Expr</a> a) (<a href="ExprType.html#t:Expr">Expr</a> a)</li><li>| <a href="#v:Const">Const</a> a</li><li>| <a href="#v:Var">Var</a> String</li></ul></li><li class="src short"><a href="#v:getVars">getVars</a> :: <a href="ExprType.html#t:Expr">Expr</a> a -> [String]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Expr" class="def">Expr</a> a <a href="#t:Expr" class="selflink">#</a></p><div class="doc"><p>A datatype for common numeric expression</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Add" class="def">Add</a> (<a href="ExprType.html#t:Expr">Expr</a> a) (<a href="ExprType.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Binary Addition</p></td></tr><tr><td class="src"><a id="v:Sub" class="def">Sub</a> (<a href="ExprType.html#t:Expr">Expr</a> a) (<a href="ExprType.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Binary Subtraction</p></td></tr><tr><td class="src"><a id="v:Mult" class="def">Mult</a> (<a href="ExprType.html#t:Expr">Expr</a> a) (<a href="ExprType.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Binary Multiplication</p></td></tr><tr><td class="src"><a id="v:Div" class="def">Div</a> (<a href="ExprType.html#t:Expr">Expr</a> a) (<a href="ExprType.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Binary Division</p></td></tr><tr><td class="src"><a id="v:Cos" class="def">Cos</a> (<a href="ExprType.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Triganometric Cosine Function</p></td></tr><tr><td class="src"><a id="v:Sin" class="def">Sin</a> (<a href="ExprType.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Triganometric Sine Function</p></td></tr><tr><td class="src"><a id="v:Log" class="def">Log</a> (<a href="ExprType.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Logorithmic Function</p></td></tr><tr><td class="src"><a id="v:Exp" class="def">Exp</a> (<a href="ExprType.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Exp (Natural) Function</p></td></tr><tr><td class="src"><a id="v:Vect" class="def">Vect</a> [<a href="ExprType.html#t:Expr">Expr</a> a]</td><td class="doc"><p>Vector Wrapper</p></td></tr><tr><td class="src"><a id="v:Pow" class="def">Pow</a> (<a href="ExprType.html#t:Expr">Expr</a> a) (<a href="ExprType.html#t:Expr">Expr</a> a)</td><td class="doc"><p>Power Operator</p></td></tr><tr><td class="src"><a id="v:Const" class="def">Const</a> a</td><td class="doc"><p>Value Wrapper</p></td></tr><tr><td class="src"><a id="v:Var" class="def">Var</a> String</td><td class="doc"><p>Variable Identifier</p></td></tr></table></div><div class="subs instances"><p id="control.i:Expr" class="caption collapser" onclick="toggleSection('i:Expr')">Instances</p><div id="section.i:Expr" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Expr:Eq:1" class="instance expander" onclick="toggleSection('i:id:Expr:Eq:1')"></span> Eq a => Eq (<a href="ExprType.html#t:Expr">Expr</a> a)</span> <a href="#t:Expr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Expr:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="ExprType.html#t:Expr">Expr</a> a -> <a href="ExprType.html#t:Expr">Expr</a> a -> Bool</p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="ExprType.html#t:Expr">Expr</a> a -> <a href="ExprType.html#t:Expr">Expr</a> a -> Bool</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Expr:Generic:2" class="instance expander" onclick="toggleSection('i:id:Expr:Generic:2')"></span> Generic (<a href="ExprType.html#t:Expr">Expr</a> a)</span> <a href="#t:Expr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Expr:Generic:2" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> Rep (<a href="ExprType.html#t:Expr">Expr</a> a) :: * -> *</p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="ExprType.html#t:Expr">Expr</a> a -> Rep (<a href="ExprType.html#t:Expr">Expr</a> a) x</p><p class="src"><a href="#v:to">to</a> :: Rep (<a href="ExprType.html#t:Expr">Expr</a> a) x -> <a href="ExprType.html#t:Expr">Expr</a> a</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Expr:Rep:3" class="instance expander" onclick="toggleSection('i:id:Expr:Rep:3')"></span> <span class="keyword">type</span> Rep (<a href="ExprType.html#t:Expr">Expr</a> a)</span> <a href="#t:Expr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Expr:Rep:3" class="inst-details hide"><div class="src"><span class="keyword">type</span> Rep (<a href="ExprType.html#t:Expr">Expr</a> a) = D1 * (MetaData "Expr" "ExprType" "main" False) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "Add" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a))))) ((:+:) * (C1 * (MetaCons "Sub" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a))))) (C1 * (MetaCons "Mult" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a))))))) ((:+:) * (C1 * (MetaCons "Div" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a))))) ((:+:) * (C1 * (MetaCons "Cos" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a)))) (C1 * (MetaCons "Sin" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a))))))) ((:+:) * ((:+:) * (C1 * (MetaCons "Log" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a)))) ((:+:) * (C1 * (MetaCons "Exp" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a)))) (C1 * (MetaCons "Vect" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [<a href="ExprType.html#t:Expr">Expr</a> a]))))) ((:+:) * (C1 * (MetaCons "Pow" PrefixI False) ((:*:) * (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a))) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (<a href="ExprType.html#t:Expr">Expr</a> a))))) ((:+:) * (C1 * (MetaCons "Const" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))) (C1 * (MetaCons "Var" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String)))))))</div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:getVars" class="def">getVars</a> <a href="#v:getVars" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="ExprType.html#t:Expr">Expr</a> a</td><td class="doc"><p>The expression to be searched for variables.</p></td></tr><tr><td class="src">-> [String]</td><td class="doc"><p>A list of the variables found with the [<code>String</code>] type.</p></td></tr></table></div><div class="doc"><p>A function that takes a variable of type (<code><a href="ExprType.html#t:Expr">Expr</a></code> a) and returns a list of strings containing the variable names wrapped by <code><a href="ExprType.html#v:Var">Var</a></code> in the expression.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.18.1</p></div></body></html>