This file is indexed.

/usr/share/doc/libghc-servant-server-doc/html/Servant-Server-Internal-Router.html is in libghc-servant-server-doc 0.8.1-2.

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
<!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>Servant.Server.Internal.Router</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_Servant-Server-Internal-Router.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Servant-Server-Internal-Router.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">servant-server-0.8.1: A family of combinators for defining webservices APIs and serving them</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Servant.Server.Internal.Router</p></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">type</span> <a href="#t:Router">Router</a> env = <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env <a href="Servant-Server-Internal-RoutingApplication.html#t:RoutingApplication">RoutingApplication</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Router-39-">Router'</a> env a<ul class="subs"><li>= <a href="#v:StaticRouter">StaticRouter</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Map-Strict.html#t:Map">Map</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> (<a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a)) [env -&gt; a]</li><li>| <a href="#v:CaptureRouter">CaptureRouter</a> (<a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>, env) a)</li><li>| <a href="#v:CaptureAllRouter">CaptureAllRouter</a> (<a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> ([<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>], env) a)</li><li>| <a href="#v:RawRouter">RawRouter</a> (env -&gt; a)</li><li>| <a href="#v:Choice">Choice</a> (<a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a) (<a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a)</li></ul></li><li class="src short"><a href="#v:pathRouter">pathRouter</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a</li><li class="src short"><a href="#v:leafRouter">leafRouter</a> :: (env -&gt; a) -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a</li><li class="src short"><a href="#v:choice">choice</a> :: <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a</li><li class="src short"><span class="keyword">data</span> <a href="#t:RouterStructure">RouterStructure</a><ul class="subs"><li>= <a href="#v:StaticRouterStructure">StaticRouterStructure</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Map-Strict.html#t:Map">Map</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a>) <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li><li>| <a href="#v:CaptureRouterStructure">CaptureRouterStructure</a> <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a></li><li>| <a href="#v:RawRouterStructure">RawRouterStructure</a></li><li>| <a href="#v:ChoiceStructure">ChoiceStructure</a> <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a> <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a></li></ul></li><li class="src short"><a href="#v:routerStructure">routerStructure</a> :: <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a></li><li class="src short"><a href="#v:sameStructure">sameStructure</a> :: <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:routerLayout">routerLayout</a> :: <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:tweakResponse">tweakResponse</a> :: (<a href="Servant-Server-Internal-RoutingApplication.html#t:RouteResult">RouteResult</a> <a href="file:///usr/share/doc/libghc-wai-doc/html/Network-Wai.html#t:Response">Response</a> -&gt; <a href="Servant-Server-Internal-RoutingApplication.html#t:RouteResult">RouteResult</a> <a href="file:///usr/share/doc/libghc-wai-doc/html/Network-Wai.html#t:Response">Response</a>) -&gt; <a href="Servant-Server-Internal-Router.html#t:Router">Router</a> env -&gt; <a href="Servant-Server-Internal-Router.html#t:Router">Router</a> env</li><li class="src short"><a href="#v:runRouter">runRouter</a> :: <a href="Servant-Server-Internal-Router.html#t:Router">Router</a> () -&gt; <a href="Servant-Server-Internal-RoutingApplication.html#t:RoutingApplication">RoutingApplication</a></li><li class="src short"><a href="#v:runRouterEnv">runRouterEnv</a> :: <a href="Servant-Server-Internal-Router.html#t:Router">Router</a> env -&gt; env -&gt; <a href="Servant-Server-Internal-RoutingApplication.html#t:RoutingApplication">RoutingApplication</a></li><li class="src short"><a href="#v:runChoice">runChoice</a> :: [env -&gt; <a href="Servant-Server-Internal-RoutingApplication.html#t:RoutingApplication">RoutingApplication</a>] -&gt; env -&gt; <a href="Servant-Server-Internal-RoutingApplication.html#t:RoutingApplication">RoutingApplication</a></li><li class="src short"><a href="#v:worseHTTPCode">worseHTTPCode</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Router" class="def">Router</a> env = <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env <a href="Servant-Server-Internal-RoutingApplication.html#t:RoutingApplication">RoutingApplication</a> <a href="src/Servant-Server-Internal-Router.html#Router" class="link">Source</a> <a href="#t:Router" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Router-39-" class="def">Router'</a> env a <a href="src/Servant-Server-Internal-Router.html#Router%27" class="link">Source</a> <a href="#t:Router-39-" class="selflink">#</a></p><div class="doc"><p>Internal representation of a router.</p><p>The first argument describes an environment type that is
 expected as extra input by the routers at the leaves. The
 environment is filled while running the router, with path
 components that can be used to process captures.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:StaticRouter" class="def">StaticRouter</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Map-Strict.html#t:Map">Map</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> (<a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a)) [env -&gt; a]</td><td class="doc"><p>the map contains routers for subpaths (first path component used
   for lookup and removed afterwards), the list contains handlers
   for the empty path, to be tried in order</p></td></tr><tr><td class="src"><a id="v:CaptureRouter" class="def">CaptureRouter</a> (<a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>, env) a)</td><td class="doc"><p>first path component is passed to the child router in its
   environment and removed afterwards</p></td></tr><tr><td class="src"><a id="v:CaptureAllRouter" class="def">CaptureAllRouter</a> (<a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> ([<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>], env) a)</td><td class="doc"><p>all path components are passed to the child router in its
   environment and are removed afterwards</p></td></tr><tr><td class="src"><a id="v:RawRouter" class="def">RawRouter</a> (env -&gt; a)</td><td class="doc"><p>to be used for routes we do not know anything about</p></td></tr><tr><td class="src"><a id="v:Choice" class="def">Choice</a> (<a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a) (<a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a)</td><td class="doc"><p>left-biased choice between two routers</p></td></tr></table></div><div class="subs instances"><p id="control.i:Router-39-" class="caption collapser" onclick="toggleSection('i:Router-39-')">Instances</p><div id="section.i:Router-39-" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Router-39-:Functor:1" class="instance expander" onclick="toggleSection('i:id:Router-39-:Functor:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env)</span> <a href="src/Servant-Server-Internal-Router.html#line-41" class="link">Source</a> <a href="#t:Router-39-" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Router-39-:Functor:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -&gt; b) -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(&lt;$)</a> :: a -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env b -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:pathRouter" class="def">pathRouter</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a <a href="src/Servant-Server-Internal-Router.html#pathRouter" class="link">Source</a> <a href="#v:pathRouter" class="selflink">#</a></p><div class="doc"><p>Smart constructor for a single static path component.</p></div></div><div class="top"><p class="src"><a id="v:leafRouter" class="def">leafRouter</a> :: (env -&gt; a) -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a <a href="src/Servant-Server-Internal-Router.html#leafRouter" class="link">Source</a> <a href="#v:leafRouter" class="selflink">#</a></p><div class="doc"><p>Smart constructor for a leaf, i.e., a router that expects
 the empty path.</p></div></div><div class="top"><p class="src"><a id="v:choice" class="def">choice</a> :: <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a <a href="src/Servant-Server-Internal-Router.html#choice" class="link">Source</a> <a href="#v:choice" class="selflink">#</a></p><div class="doc"><p>Smart constructor for the choice between routers.
 We currently optimize the following cases:</p><ul><li>Two static routers can be joined by joining their maps
     and concatenating their leaf-lists.</li><li>Two dynamic routers can be joined by joining their codomains.</li><li>Choice nodes can be reordered.</li></ul></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:RouterStructure" class="def">RouterStructure</a> <a href="src/Servant-Server-Internal-Router.html#RouterStructure" class="link">Source</a> <a href="#t:RouterStructure" class="selflink">#</a></p><div class="doc"><p>Datatype used for representing and debugging the
 structure of a router. Abstracts from the handlers
 at the leaves.</p><p>Two <code><a href="Servant-Server-Internal-Router.html#t:Router">Router</a></code>s can be structurally compared by computing
 their <code><a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a></code> using <code><a href="Servant-Server-Internal-Router.html#v:routerStructure">routerStructure</a></code> and
 then testing for equality, see <code><a href="Servant-Server-Internal-Router.html#v:sameStructure">sameStructure</a></code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:StaticRouterStructure" class="def">StaticRouterStructure</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Map-Strict.html#t:Map">Map</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a>) <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:CaptureRouterStructure" class="def">CaptureRouterStructure</a> <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:RawRouterStructure" class="def">RawRouterStructure</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:ChoiceStructure" class="def">ChoiceStructure</a> <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a> <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:RouterStructure" class="caption collapser" onclick="toggleSection('i:RouterStructure')">Instances</p><div id="section.i:RouterStructure" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RouterStructure:Eq:1" class="instance expander" onclick="toggleSection('i:id:RouterStructure:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a></span> <a href="src/Servant-Server-Internal-Router.html#line-82" class="link">Source</a> <a href="#t:RouterStructure" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:RouterStructure: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="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a> -&gt; <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.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="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a> -&gt; <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.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:RouterStructure:Show:2" class="instance expander" onclick="toggleSection('i:id:RouterStructure:Show:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a></span> <a href="src/Servant-Server-Internal-Router.html#line-82" class="link">Source</a> <a href="#t:RouterStructure" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:RouterStructure:Show:2" 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.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.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="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.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="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.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"><a id="v:routerStructure" class="def">routerStructure</a> :: <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="Servant-Server-Internal-Router.html#t:RouterStructure">RouterStructure</a> <a href="src/Servant-Server-Internal-Router.html#routerStructure" class="link">Source</a> <a href="#v:routerStructure" class="selflink">#</a></p><div class="doc"><p>Compute the structure of a router.</p><p>Assumes that the request or text being passed
 in <code>WithRequest</code> or <code><a href="Servant-Server-Internal-Router.html#v:CaptureRouter">CaptureRouter</a></code> does not
 affect the structure of the underlying tree.</p></div></div><div class="top"><p class="src"><a id="v:sameStructure" class="def">sameStructure</a> :: <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env b -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Servant-Server-Internal-Router.html#sameStructure" class="link">Source</a> <a href="#v:sameStructure" class="selflink">#</a></p><div class="doc"><p>Compare the structure of two routers.</p></div></div><div class="top"><p class="src"><a id="v:routerLayout" class="def">routerLayout</a> :: <a href="Servant-Server-Internal-Router.html#t:Router-39-">Router'</a> env a -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Servant-Server-Internal-Router.html#routerLayout" class="link">Source</a> <a href="#v:routerLayout" class="selflink">#</a></p><div class="doc"><p>Provide a textual representation of the
 structure of a router.</p></div></div><div class="top"><p class="src"><a id="v:tweakResponse" class="def">tweakResponse</a> :: (<a href="Servant-Server-Internal-RoutingApplication.html#t:RouteResult">RouteResult</a> <a href="file:///usr/share/doc/libghc-wai-doc/html/Network-Wai.html#t:Response">Response</a> -&gt; <a href="Servant-Server-Internal-RoutingApplication.html#t:RouteResult">RouteResult</a> <a href="file:///usr/share/doc/libghc-wai-doc/html/Network-Wai.html#t:Response">Response</a>) -&gt; <a href="Servant-Server-Internal-Router.html#t:Router">Router</a> env -&gt; <a href="Servant-Server-Internal-Router.html#t:Router">Router</a> env <a href="src/Servant-Server-Internal-Router.html#tweakResponse" class="link">Source</a> <a href="#v:tweakResponse" class="selflink">#</a></p><div class="doc"><p>Apply a transformation to the response of a <code><a href="Servant-Server-Internal-Router.html#t:Router">Router</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:runRouter" class="def">runRouter</a> :: <a href="Servant-Server-Internal-Router.html#t:Router">Router</a> () -&gt; <a href="Servant-Server-Internal-RoutingApplication.html#t:RoutingApplication">RoutingApplication</a> <a href="src/Servant-Server-Internal-Router.html#runRouter" class="link">Source</a> <a href="#v:runRouter" class="selflink">#</a></p><div class="doc"><p>Interpret a router as an application.</p></div></div><div class="top"><p class="src"><a id="v:runRouterEnv" class="def">runRouterEnv</a> :: <a href="Servant-Server-Internal-Router.html#t:Router">Router</a> env -&gt; env -&gt; <a href="Servant-Server-Internal-RoutingApplication.html#t:RoutingApplication">RoutingApplication</a> <a href="src/Servant-Server-Internal-Router.html#runRouterEnv" class="link">Source</a> <a href="#v:runRouterEnv" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:runChoice" class="def">runChoice</a> :: [env -&gt; <a href="Servant-Server-Internal-RoutingApplication.html#t:RoutingApplication">RoutingApplication</a>] -&gt; env -&gt; <a href="Servant-Server-Internal-RoutingApplication.html#t:RoutingApplication">RoutingApplication</a> <a href="src/Servant-Server-Internal-Router.html#runChoice" class="link">Source</a> <a href="#v:runChoice" class="selflink">#</a></p><div class="doc"><p>Try a list of routing applications in order.
 We stop as soon as one fails fatally or succeeds.
 If all fail normally, we pick the &quot;best&quot; error.</p></div></div><div class="top"><p class="src"><a id="v:worseHTTPCode" class="def">worseHTTPCode</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Servant-Server-Internal-Router.html#worseHTTPCode" class="link">Source</a> <a href="#v:worseHTTPCode" class="selflink">#</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>