/usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Ok.html is in libghc-postgresql-simple-doc 0.5.3.0-1build5.
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 | <!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>Database.PostgreSQL.Simple.Ok</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Database-PostgreSQL-Simple-Ok.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Database-PostgreSQL-Simple-Ok.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">postgresql-simple-0.5.3.0: Mid-Level PostgreSQL client library</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(c) 2012-2015 Leon P Smith</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>leon@melding-monads.com</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Database.PostgreSQL.Simple.Ok</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The <code><a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a></code> type is a simple error handler, basically equivalent to
<code>Either [SomeException]</code>. This type (without the list) was used to
handle conversion errors in early versions of postgresql-simple.</p><p>One of the primary reasons why this type was introduced is that
<code>Either SomeException</code> had not been provided an instance for <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Alternative">Alternative</a></code>,
and it would have been a bad idea to provide an orphaned instance for a
commonly-used type and typeclass included in <code>base</code>.</p><p>Extending the failure case to a list of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a></code>s enables a
more sensible <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Alternative">Alternative</a></code> instance definitions: <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#v:-60--124--62-"><|></a></code> concatenates
the list of exceptions when both cases fail, and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#v:empty">empty</a></code> is defined as
'Errors []'. Though <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#v:-60--124--62-"><|></a></code> one could pick one of two exceptions, and
throw away the other, and have <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#v:empty">empty</a></code> provide a generic exception,
this avoids cases where <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#v:empty">empty</a></code> overrides a more informative exception
and allows you to see all the different ways your computation has failed.</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:Ok">Ok</a> a<ul class="subs"><li>= <a href="#v:Errors">Errors</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a>]</li><li>| <a href="#v:Ok">Ok</a> !a</li></ul></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ManyErrors">ManyErrors</a> = <a href="#v:ManyErrors">ManyErrors</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a>]</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Ok" class="def">Ok</a> a <a href="src/Database-PostgreSQL-Simple-Ok.html#Ok" class="link">Source</a> <a href="#t:Ok" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Errors" class="def">Errors</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a>]</td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:Ok" class="def">Ok</a> !a</td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:Ok" class="caption collapser" onclick="toggleSection('i:Ok')">Instances</p><div id="section.i:Ok" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Ok:Monad:1" class="instance expander" onclick="toggleSection('i:id:Ok:Monad:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a></span> <a href="src/Database-PostgreSQL-Simple-Ok.html#line-72" class="link">Source</a> <a href="#t:Ok" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Ok:Monad:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(>>=)</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> (a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> b) -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> b <a href="#v:-62--62--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62--62-">(>>)</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> b -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> b <a href="#v:-62--62-" class="selflink">#</a></p><p class="src"><a href="#v:return">return</a> :: a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a <a href="#v:return" class="selflink">#</a></p><p class="src"><a href="#v:fail">fail</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a <a href="#v:fail" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Ok:Functor:2" class="instance expander" onclick="toggleSection('i:id:Ok:Functor:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a></span> <a href="src/Database-PostgreSQL-Simple-Ok.html#line-44" class="link">Source</a> <a href="#t:Ok" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Ok:Functor:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -> b) -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(<$)</a> :: a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> b -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Ok:Applicative:3" class="instance expander" onclick="toggleSection('i:id:Ok:Applicative:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a></span> <a href="src/Database-PostgreSQL-Simple-Ok.html#line-54" class="link">Source</a> <a href="#t:Ok" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Ok:Applicative:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pure">pure</a> :: a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(<*>)</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> (a -> b) -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> b <a href="#v:-60--42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-42--62-">(*>)</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> b -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(<*)</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> b -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a <a href="#v:-60--42-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Ok:Alternative:4" class="instance expander" onclick="toggleSection('i:id:Ok:Alternative:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Alternative">Alternative</a> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a></span> <a href="src/Database-PostgreSQL-Simple-Ok.html#line-61" class="link">Source</a> <a href="#t:Ok" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Ok:Alternative:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:empty">empty</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a <a href="#v:empty" class="selflink">#</a></p><p class="src"><a href="#v:-60--124--62-">(<|>)</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a <a href="#v:-60--124--62-" class="selflink">#</a></p><p class="src"><a href="#v:some">some</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> [a] <a href="#v:some" class="selflink">#</a></p><p class="src"><a href="#v:many">many</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> [a] <a href="#v:many" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Ok:MonadPlus:5" class="instance expander" onclick="toggleSection('i:id:Ok:MonadPlus:5')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a></span> <a href="src/Database-PostgreSQL-Simple-Ok.html#line-68" class="link">Source</a> <a href="#t:Ok" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Ok:MonadPlus:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mzero">mzero</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a <a href="#v:mzero" class="selflink">#</a></p><p class="src"><a href="#v:mplus">mplus</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a <a href="#v:mplus" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Ok:Eq:6" class="instance expander" onclick="toggleSection('i:id:Ok:Eq:6')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a)</span> <a href="src/Database-PostgreSQL-Simple-Ok.html#line-49" class="link">Source</a> <a href="#t:Ok" class="selflink">#</a></td><td class="doc"><p>Two <code><a href="Database-PostgreSQL-Simple-Ok.html#v:Errors">Errors</a></code> cases are considered equal, regardless of what the
list of exceptions looks like.</p></td></tr><tr><td colspan="2"><div id="section.i:id:Ok:Eq:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Ok:Show:7" class="instance expander" onclick="toggleSection('i:id:Ok:Show:7')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a)</span> <a href="src/Database-PostgreSQL-Simple-Ok.html#line-44" class="link">Source</a> <a href="#t:Ok" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Ok:Show:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Database-PostgreSQL-Simple-Ok.html#t:Ok">Ok</a> a] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:ManyErrors" class="def">ManyErrors</a> <a href="src/Database-PostgreSQL-Simple-Ok.html#ManyErrors" class="link">Source</a> <a href="#t:ManyErrors" class="selflink">#</a></p><div class="doc"><p>a way to reify a list of exceptions into a single exception</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:ManyErrors" class="def">ManyErrors</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a>]</td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:ManyErrors" class="caption collapser" onclick="toggleSection('i:ManyErrors')">Instances</p><div id="section.i:ManyErrors" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ManyErrors:Show:1" class="instance expander" onclick="toggleSection('i:id:ManyErrors:Show:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Database-PostgreSQL-Simple-Ok.html#t:ManyErrors">ManyErrors</a></span> <a href="src/Database-PostgreSQL-Simple-Ok.html#line-85" class="link">Source</a> <a href="#t:ManyErrors" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:ManyErrors:Show:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Database-PostgreSQL-Simple-Ok.html#t:ManyErrors">ManyErrors</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:ManyErrors">ManyErrors</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Database-PostgreSQL-Simple-Ok.html#t:ManyErrors">ManyErrors</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ManyErrors:Exception:2" class="instance expander" onclick="toggleSection('i:id:ManyErrors:Exception:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> <a href="Database-PostgreSQL-Simple-Ok.html#t:ManyErrors">ManyErrors</a></span> <a href="src/Database-PostgreSQL-Simple-Ok.html#line-87" class="link">Source</a> <a href="#t:ManyErrors" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:ManyErrors:Exception:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toException">toException</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:ManyErrors">ManyErrors</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> <a href="#v:toException" class="selflink">#</a></p><p class="src"><a href="#v:fromException">fromException</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Database-PostgreSQL-Simple-Ok.html#t:ManyErrors">ManyErrors</a> <a href="#v:fromException" class="selflink">#</a></p><p class="src"><a href="#v:displayException">displayException</a> :: <a href="Database-PostgreSQL-Simple-Ok.html#t:ManyErrors">ManyErrors</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:displayException" class="selflink">#</a></p></div></div></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.17.3</p></div></body></html>
|