<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>TensorFlow.Types</title><linkhref="ocean.css"rel="stylesheet"type="text/css"title="Ocean"/><scriptsrc="haddock-util.js"type="text/javascript"></script><scripttype="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_TensorFlow-Types.html");};
</pre><p>using an enumeration of all the possible <code><ahref="TensorFlow-Types.html#t:TensorType">TensorType</a></code>s.</p></div></div><divclass="top"><pclass="src"><spanclass="keyword">type family</span> a <aname="t:-47--61-"class="def">/=</a> b :: <ahref="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></p><divclass="doc"><p>A constraint checking that two types are different.</p></div><divclass="subs equations"><pclass="caption">Equations</p><table><tr><tdclass="src">a <ahref="TensorFlow-Types.html#t:-47--61-">/=</a> a = <ahref="TensorFlow-Types.html#t:TypeError">TypeError</a> a ~ <ahref="TensorFlow-Types.html#t:ExcludedCase">ExcludedCase</a></td><tdclass="doc empty"> </td></tr><tr><tdclass="src">a <ahref="TensorFlow-Types.html#t:-47--61-">/=</a> b = ()</td><tdclass="doc empty"> </td></tr></table></div></div><h2id="g:2">Implementation of constraints</h2><divclass="top"><pclass="src"><spanclass="keyword">data</span><aname="t:TypeError"class="def">TypeError</a> a</p><divclass="doc"><p>Helper types to produce a reasonable type error message when the Constraint
TODO(judahjacobson): Use ghc-8's CustomTypeErrors for this.</p></div></div><divclass="top"><pclass="src"><spanclass="keyword">data</span><aname="t:ExcludedCase"class="def">ExcludedCase</a></p></div><divclass="top"><pclass="src"><spanclass="keyword">type family</span><aname="t:TensorTypes"class="def">TensorTypes</a> ts :: <ahref="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></p><divclass="doc"><p>A <code><ahref="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></code> checking that the input is a list of <code><ahref="TensorFlow-Types.html#t:TensorType">TensorType</a></code>s.
Helps improve error messages when using <code><ahref="TensorFlow-Types.html#t:OneOf">OneOf</a></code>.</p></div><divclass="subs equations"><pclass="caption">Equations</p><table><tr><tdclass="src"><ahref="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> `[]` = ()</td><tdclass="doc empty"> </td></tr><tr><tdclass="src"><ahref="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> (t : ts) = (<ahref="TensorFlow-Types.html#t:TensorType">TensorType</a> t, <ahref="TensorFlow-Types.html#t:TensorTypes">TensorTypes</a> ts)</td><tdclass="doc empty"> </td></tr></table></div></div><divclass="top"><pclass="src"><spanclass="keyword">type family</span><aname="t:NoneOf"class="def">NoneOf</a> ts a :: <ahref="../base-4.8.2.0/GHC-Exts.html#t:Constraint">Constraint</a></p><divclass="doc"><p>A constraint that the type <code>a</code> doesn't appear in the type list <code>ts</code>.
Assumes that <code>a</code> and each of the elements of <code>ts</code> are <code><ahref="TensorFlow-Types.html#t:TensorType">TensorType</a></code>s.</p></div><divclass="subs equations"><pclass="caption">Equations</p><table><tr><tdclass="src"><ahref="TensorFlow-Types.html#t:NoneOf">NoneOf</a> `[]` a = ()</td><tdclass="doc empty"> </td></tr><tr><tdclass="src"><ahref="TensorFlow-Types.html#t:NoneOf">NoneOf</a> (t : ts) a = (a <ahref="TensorFlow-Types.html#t:-47--61-">/=</a> t, <ahref="TensorFlow-Types.html#t:NoneOf">NoneOf</a> ts a)</td><tdclass="doc empty"> </td></tr></table></div></div><divclass="top"><pclass="src"><spanclass="keyword">type family</span> as <aname="t:-92--92-"class="def">\\</a> bs</p><divclass="doc"><p>Takes the difference of two lists of types.</p></div><divclass="subs equations"><pclass="caption">Equations</p><table><tr><tdclass="src">as <ahref="TensorFlow-Types.html#t:-92--92-">\\</a> `[]` = as</td><tdclass="doc empty"> </td></tr><tr><tdclass="src">as <ahref="TensorFlow-Types.html#t:-92--92-">\\</a> (b : bs) = <ahref="TensorFlow-Types.html#t:Delete">Delete</a> b as <ahref="TensorFlow-Types.html#t:-92--92-">\\</a> bs</td><tdclass="doc empty"> </td></tr></table></div></div><divclass="top"><pclass="src"><spanclass="keyword">type family</span><aname="t:Delete"class="def">Delete</a> a as</p><divclass="doc"><p>Removes a type from the given list of types.</p></div><divclass="subs equations"><pclass="caption">Equations</p><table><tr><tdclass="src"><ahref="TensorFlow-Types.html#t:Delete">Delete</a> a `[]` = `[]`</td><tdclass="doc empty"> </td></tr><tr><tdclass="src"><ahref="TensorFlow-Types.html#t:Delete">Delete</a> a (a : as) = <ahref="TensorFlow-Types.html#t:Delete">Delete</a> a as</td><tdclass="doc empty"> </td></tr><tr><tdclass="src"><ahref="TensorFlow-Types.html#t:Delete">Delete</a> a (b : as) = b : <ahref="TensorFlow-Types.html#t:Delete">Delete</a> a as</td><tdclass="doc empty"> </td></tr></table></div></div><divclass="top"><pclass="src"><spanclass="keyword">type</span><aname="t:AllTensorTypes"class="def">AllTensorTypes</a> = `[<ahref="../base-4.8.2.0/Prelude.html#t:Float">Float</a>, <ahref="../base-4.8.2.0/Prelude.html#t:Double">Double</a>, <ahref="../base-4.8.2.0/Data-Int.html#t:Int8">Int8</a>, <ahref="../base-4.8.2.0/Data-Int.html#t:Int16">Int16</a>, <ahref="../base-4.8.2.0/Data-Int.html#t:Int32">Int32</a>, <ahref="../base-4.8.2.0/Data-Int.html#t:Int64">Int64</a>, <ahref="../base-4.8.2.0/Data-Word.html#t:Word8">Word8</a>, <ahref="../base-4.8.2.0/Data-Word.html#t:Word16">Word16</a>, <ahref="../bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, <ahref="../base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>]`</p><divclass="doc"><p>An enumeration of all valid <code><ahref="TensorFlow-Types.html#t:TensorType">TensorType</a></code>s.</p></div></div></div></div><divid="footer"><p>Produced by <ahref="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>