/usr/share/doc/libghc-zeromq3-haskell-doc/html/Data-Restricted.html is in libghc-zeromq3-haskell-doc 0.4-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <!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>Data.Restricted</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_Data-Restricted.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Restricted.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">zeromq3-haskell-0.4: Bindings to ZeroMQ 3.x</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Toralf Wittner <tw@dtex.org></td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Data.Restricted</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Type-level restricted data.
This module allows for type declarations which embed certain restrictions,
such as value bounds. E.g. <code>Restricted N0 N1 Int</code> denotes an <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></code> which can
only have values [0 .. 1]. When creating such a value, the constructor functions
<code><a href="Data-Restricted.html#v:restrict">restrict</a></code> or <code><a href="Data-Restricted.html#v:toRestricted">toRestricted</a></code> ensure that the restrictions are obeyed. Code
that consumes restricted types does not need to check the constraints.
</p><p><em>N.B.</em> This module is more or less tailored to be used within <code><a href="System.html#t:ZMQ3">ZMQ3</a></code>.
Therefore the provided type level restrictions are limited.
</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:Restricted">Restricted</a> l u v</li><li class="src short"><span class="keyword">class</span> <a href="#t:Restriction">Restriction</a> l u v <span class="keyword">where</span><ul class="subs"><li><a href="#v:toRestricted">toRestricted</a> :: v -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Data-Restricted.html#t:Restricted">Restricted</a> l u v)</li><li><a href="#v:restrict">restrict</a> :: v -> <a href="Data-Restricted.html#t:Restricted">Restricted</a> l u v</li></ul></li><li class="src short"><a href="#v:rvalue">rvalue</a> :: <a href="Data-Restricted.html#t:Restricted">Restricted</a> l u v -> v</li><li class="src short"><span class="keyword">data</span> <a href="#t:Nneg1">Nneg1</a> </li><li class="src short"><span class="keyword">data</span> <a href="#t:N1">N1</a> </li><li class="src short"><span class="keyword">data</span> <a href="#t:N0">N0</a> </li><li class="src short"><span class="keyword">data</span> <a href="#t:N254">N254</a> </li><li class="src short"><span class="keyword">data</span> <a href="#t:Inf">Inf</a> </li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Restricted" class="def">Restricted</a> l u v <a href="src/Data-Restricted.html#Restricted" class="link">Source</a></p><div class="doc"><p>Type level restriction.
</p></div><div class="subs instances"><p id="control.i:Restricted" class="caption collapser" onclick="toggleSection('i:Restricted')">Instances</p><div id="section.i:Restricted" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> v => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> (<a href="Data-Restricted.html#t:Restricted">Restricted</a> l u v)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Restriction" class="def">Restriction</a> l u v <span class="keyword">where</span><a href="src/Data-Restricted.html#Restriction" class="link">Source</a></p><div class="doc"><p>A uniform way to restrict values.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:toRestricted" class="def">toRestricted</a> :: v -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="Data-Restricted.html#t:Restricted">Restricted</a> l u v)<a href="src/Data-Restricted.html#toRestricted" class="link">Source</a></p><div class="doc"><p>Create a restricted value. Returns <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Nothing">Nothing</a></code> if
the given value does not satisfy all restrictions.
</p></div><p class="src"><a name="v:restrict" class="def">restrict</a> :: v -> <a href="Data-Restricted.html#t:Restricted">Restricted</a> l u v<a href="src/Data-Restricted.html#restrict" class="link">Source</a></p><div class="doc"><p>Create a restricted value. If the given value
does not satisfy the restrictions, a modified
variant is used instead, e.g. if an integer is
larger than the upper bound, the upper bound
value is used.
</p></div></div><div class="subs instances"><p id="control.i:Restriction" class="caption collapser" onclick="toggleSection('i:Restriction')">Instances</p><div id="section.i:Restriction" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int32">Int32</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="Data-Restricted.html#t:Inf">Inf</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="Data-Restricted.html#t:N254">N254</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="Data-Restricted.html#t:N254">N254</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N0">N0</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int32">Int32</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N0">N0</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N0">N0</a> <a href="Data-Restricted.html#t:Inf">Inf</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:Nneg1">Nneg1</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int32">Int32</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:Nneg1">Nneg1</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:Nneg1">Nneg1</a> <a href="Data-Restricted.html#t:Inf">Inf</a> a</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:rvalue" class="def">rvalue</a> :: <a href="Data-Restricted.html#t:Restricted">Restricted</a> l u v -> v<a href="src/Data-Restricted.html#rvalue" class="link">Source</a></p><div class="doc"><p>Get the actual value.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Nneg1" class="def">Nneg1</a> <a href="src/Data-Restricted.html#Nneg1" class="link">Source</a></p><div class="doc"><p>type level -1
</p></div><div class="subs instances"><p id="control.i:Nneg1" class="caption collapser" onclick="toggleSection('i:Nneg1')">Instances</p><div id="section.i:Nneg1" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Restricted.html#t:Nneg1">Nneg1</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:Nneg1">Nneg1</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int32">Int32</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:Nneg1">Nneg1</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:Nneg1">Nneg1</a> <a href="Data-Restricted.html#t:Inf">Inf</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:N1" class="def">N1</a> <a href="src/Data-Restricted.html#N1" class="link">Source</a></p><div class="doc"><p>type-level 1
</p></div><div class="subs instances"><p id="control.i:N1" class="caption collapser" onclick="toggleSection('i:N1')">Instances</p><div id="section.i:N1" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Restricted.html#t:N1">N1</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int32">Int32</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="Data-Restricted.html#t:Inf">Inf</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="Data-Restricted.html#t:N254">N254</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="Data-Restricted.html#t:N254">N254</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</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:N0" class="def">N0</a> <a href="src/Data-Restricted.html#N0" class="link">Source</a></p><div class="doc"><p>type-level 0
</p></div><div class="subs instances"><p id="control.i:N0" class="caption collapser" onclick="toggleSection('i:N0')">Instances</p><div id="section.i:N0" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Restricted.html#t:N0">N0</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N0">N0</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int32">Int32</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N0">N0</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int64">Int64</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N0">N0</a> <a href="Data-Restricted.html#t:Inf">Inf</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:N254" class="def">N254</a> <a href="src/Data-Restricted.html#N254" class="link">Source</a></p><div class="doc"><p>type-level 254
</p></div><div class="subs instances"><p id="control.i:N254" class="caption collapser" onclick="toggleSection('i:N254')">Instances</p><div id="section.i:N254" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Restricted.html#t:N254">N254</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="Data-Restricted.html#t:N254">N254</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="Data-Restricted.html#t:N254">N254</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString.html#t:ByteString">ByteString</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:Inf" class="def">Inf</a> <a href="src/Data-Restricted.html#Inf" class="link">Source</a></p><div class="doc"><p>type-level infinity
</p></div><div class="subs instances"><p id="control.i:Inf" class="caption collapser" onclick="toggleSection('i:Inf')">Instances</p><div id="section.i:Inf" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Restricted.html#t:Inf">Inf</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N1">N1</a> <a href="Data-Restricted.html#t:Inf">Inf</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:N0">N0</a> <a href="Data-Restricted.html#t:Inf">Inf</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a => <a href="Data-Restricted.html#t:Restriction">Restriction</a> <a href="Data-Restricted.html#t:Nneg1">Nneg1</a> <a href="Data-Restricted.html#t:Inf">Inf</a> a</td><td class="doc empty"> </td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|