Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4764914f605c152e932025400e9be0fa > files > 14

ghc-tagged-devel-0.2.3.1-1.fc15.i686.rpm

<!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.Proxy</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-Proxy.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Proxy.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">tagged-0.2.3.1: Provides newtype wrappers for phantom types to avoid unsafely passing dummy arguments</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>generalized newtype deriving</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr></table><p class="caption">Data.Proxy</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Tagged values
</a></li><li><a href="#g:2">Conversion
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</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:Proxy">Proxy</a> p = <a href="#v:Proxy">Proxy</a></li><li class="src short"><a href="#v:reproxy">reproxy</a> ::  <a href="Data-Proxy.html#t:Proxy">Proxy</a> s -&gt; <a href="Data-Proxy.html#t:Proxy">Proxy</a> t</li><li class="src short"><a href="#v:asProxyTypeOf">asProxyTypeOf</a> ::  a -&gt; <a href="Data-Proxy.html#t:Proxy">Proxy</a> a -&gt; a</li><li class="src short"><a href="#v:proxy">proxy</a> ::  <a href="Data-Tagged.html#t:Tagged">Tagged</a> s a -&gt; <a href="Data-Proxy.html#t:Proxy">Proxy</a> s -&gt; a</li><li class="src short"><a href="#v:unproxy">unproxy</a> ::  (<a href="Data-Proxy.html#t:Proxy">Proxy</a> s -&gt; a) -&gt; <a href="Data-Tagged.html#t:Tagged">Tagged</a> s a</li></ul></div><div id="interface"><h1 id="g:1">Tagged values
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Proxy" class="def">Proxy</a> p <a href="src/Data-Proxy.html#Proxy" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Proxy" class="def">Proxy</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Proxy" class="caption collapser" onclick="toggleSection('i:Proxy')">Instances</p><div id="section.i:Proxy" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> <a href="Data-Proxy.html#t:Proxy">Proxy</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> <a href="Data-Proxy.html#t:Proxy">Proxy</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Typeable.html#t:Typeable1">Typeable1</a> <a href="Data-Proxy.html#t:Proxy">Proxy</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Applicative.html#t:Applicative">Applicative</a> <a href="Data-Proxy.html#t:Proxy">Proxy</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Foldable.html#t:Foldable">Foldable</a> <a href="Data-Proxy.html#t:Proxy">Proxy</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Traversable.html#t:Traversable">Traversable</a> <a href="Data-Proxy.html#t:Proxy">Proxy</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Bounded">Bounded</a> (<a href="Data-Proxy.html#t:Proxy">Proxy</a> s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Enum">Enum</a> (<a href="Data-Proxy.html#t:Proxy">Proxy</a> s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Data-Proxy.html#t:Proxy">Proxy</a> p)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Data.html#t:Data">Data</a> p =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Data.html#t:Data">Data</a> (<a href="Data-Proxy.html#t:Proxy">Proxy</a> p)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Data-Proxy.html#t:Proxy">Proxy</a> p)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Read.html#t:Read">Read</a> (<a href="Data-Proxy.html#t:Proxy">Proxy</a> p)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> (<a href="Data-Proxy.html#t:Proxy">Proxy</a> p)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ix.html#t:Ix">Ix</a> (<a href="Data-Proxy.html#t:Proxy">Proxy</a> s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Data-Proxy.html#t:Proxy">Proxy</a> s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/data-default-0.3.0/Data-Default.html#t:Default">Default</a> (<a href="Data-Proxy.html#t:Proxy">Proxy</a> s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/semigroups-0.8/Data-Semigroup.html#t:Semigroup">Semigroup</a> (<a href="Data-Proxy.html#t:Proxy">Proxy</a> s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:reproxy" class="def">reproxy</a> ::  <a href="Data-Proxy.html#t:Proxy">Proxy</a> s -&gt; <a href="Data-Proxy.html#t:Proxy">Proxy</a> t<a href="src/Data-Proxy.html#reproxy" class="link">Source</a></p><div class="doc"><p>Some times you need to change the proxy you have lying around.
 Idiomatic usage is to make a new combinator for the relationship 
 between the proxies that you want to enforce, and define that 
 combinator using <code><a href="Data-Proxy.html#v:reproxy">reproxy</a></code>.
</p><pre> data Succ n
 reproxySucc :: Proxy n -&gt; Proxy (Succ n)
 reproxySucc = reproxy
</pre></div></div><div class="top"><p class="src"><a name="v:asProxyTypeOf" class="def">asProxyTypeOf</a> ::  a -&gt; <a href="Data-Proxy.html#t:Proxy">Proxy</a> a -&gt; a<a href="src/Data-Proxy.html#asProxyTypeOf" class="link">Source</a></p><div class="doc"><p><code><a href="Data-Proxy.html#v:asProxyTypeOf">asProxyTypeOf</a></code> is a type-restricted version of <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#v:const">const</a></code>. 
 It is usually used as an infix operator, and its typing forces its first 
 argument (which is usually overloaded) to have the same type as the tag 
 of the second.
</p></div></div><h1 id="g:2">Conversion
</h1><div class="top"><p class="src"><a name="v:proxy" class="def">proxy</a> ::  <a href="Data-Tagged.html#t:Tagged">Tagged</a> s a -&gt; <a href="Data-Proxy.html#t:Proxy">Proxy</a> s -&gt; a<a href="src/Data-Proxy.html#proxy" class="link">Source</a></p><div class="doc"><p>Convert from a <code><a href="Data-Tagged.html#t:Tagged">Tagged</a></code> representation to a representation 
 based on a <code><a href="Data-Proxy.html#t:Proxy">Proxy</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:unproxy" class="def">unproxy</a> ::  (<a href="Data-Proxy.html#t:Proxy">Proxy</a> s -&gt; a) -&gt; <a href="Data-Tagged.html#t:Tagged">Tagged</a> s a<a href="src/Data-Proxy.html#unproxy" class="link">Source</a></p><div class="doc"><p>Convert from a representation based on a <code><a href="Data-Proxy.html#t:Proxy">Proxy</a></code> to a <code><a href="Data-Tagged.html#t:Tagged">Tagged</a></code> 
 representation.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>