-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A Webmachine-inspired HTTP library
--   
--   A Webmachine-inspired HTTP library based off ideas from the original
--   Erlang project <a>https://github.com/webmachine/webmachine</a>
--   
--   A number of examples can be found in
--   <a>https://github.com/helium/airship/tree/master/example</a>
--   illustrating how to build airship based services.
@package airship
@version 0.9.3

module Airship.Config

-- | An opaque data type encapsulating all Airship-specific configuration
--   options.
--   
--   We use lenses to modify <a>AirshipConfig</a> values -- though Airship
--   only depends on the microlens library, its lenses are compatible with
--   Control.Lens.
data AirshipConfig
data HeaderInclusion
IncludeHeader :: HeaderInclusion
OmitHeader :: HeaderInclusion

-- | Determines whether or not the <tt>Airship-Trace</tt> header, which
--   traces the execution of a given request in the Airship decision tree,
--   is included in every HTTP response. While exposing the decision tree
--   is usually innocuous (and makes for significantly easier debugging),
--   you may want to turn it off in certain circumstances.
--   
--   Defaults to <a>IncludeHeader</a> (enabled).
includeTraceHeader :: Lens' AirshipConfig HeaderInclusion

-- | Determines whether or not the <tt>Airship-Quip</tt> header, which
--   includes a pithy quote in your response headers, is included in every
--   HTTP response.
--   
--   Defaults to <a>IncludeHeader</a> (enabled).
includeQuipHeader :: Lens' AirshipConfig HeaderInclusion

-- | The default configuration. Use this, in conjunction with the lenses
--   declared above, to get and modify an <a>AirshipConfig</a> to pass to
--   <tt>resourceToWai</tt>.
defaultAirshipConfig :: AirshipConfig
instance GHC.Show.Show Airship.Config.HeaderInclusion
instance GHC.Classes.Eq Airship.Config.HeaderInclusion

module Airship.RST
newtype RST r s e m a
RST :: (r -> s -> m (Either e a, s)) -> RST r s e m a
[runRST] :: RST r s e m a -> r -> s -> m (Either e a, s)
evalRST :: Monad m => RST r s e m a -> r -> s -> m (Either e a)
execRST :: Monad m => RST r s e m a -> r -> s -> m s
mapRST :: (m (Either e a, s) -> n (Either e b, s)) -> RST r s e m a -> RST r s e n b
withRST :: Monad m => (r' -> r) -> RST r s e m a -> RST r' s e m a
failure :: Monad m => e -> RST r s e m a
instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader r (Airship.RST.RST r s e m)
instance GHC.Base.Functor m => GHC.Base.Functor (Airship.RST.RST r s e m)
instance GHC.Base.Monad m => GHC.Base.Applicative (Airship.RST.RST r s e m)
instance GHC.Base.MonadPlus m => GHC.Base.Alternative (Airship.RST.RST r s e m)
instance GHC.Base.Monad m => Control.Monad.State.Class.MonadState s (Airship.RST.RST r s e m)
instance GHC.Base.Monad m => GHC.Base.Monad (Airship.RST.RST r s e m)
instance GHC.Base.MonadPlus m => GHC.Base.MonadPlus (Airship.RST.RST r s e m)
instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Airship.RST.RST r s e m)
instance Control.Monad.Trans.Class.MonadTrans (Airship.RST.RST r s e)
instance Control.Monad.Base.MonadBase b m => Control.Monad.Base.MonadBase b (Airship.RST.RST r s e m)
instance Control.Monad.Trans.Control.MonadBaseControl b m => Control.Monad.Trans.Control.MonadBaseControl b (Airship.RST.RST r s e m)
instance Control.Monad.Trans.Control.MonadTransControl (Airship.RST.RST r s e)

module Airship.Types
data ETag
Strong :: ByteString -> ETag
Weak :: ByteString -> ETag
data Webmachine m a
data AirshipRequest
AirshipRequest :: Request -> Text -> AirshipRequest
[_request] :: AirshipRequest -> Request
[_routePath] :: AirshipRequest -> Text

-- | Information on the request sent by the client. This abstracts away the
--   details of the underlying implementation.
data Request :: *
data RequestReader
RequestReader :: UTCTime -> AirshipRequest -> RequestReader
[_now] :: RequestReader -> UTCTime
[_airshipRequest] :: RequestReader -> AirshipRequest
data Response
Response :: Status -> ResponseHeaders -> ResponseBody -> Response
[_responseStatus] :: Response -> Status
[_responseHeaders] :: Response -> ResponseHeaders
[_responseBody] :: Response -> ResponseBody
data ResponseState
ResponseState :: ResponseHeaders -> ResponseBody -> HashMap Text Text -> [Text] -> Trace -> ResponseState
[stateHeaders] :: ResponseState -> ResponseHeaders
[stateBody] :: ResponseState -> ResponseBody
[_params] :: ResponseState -> HashMap Text Text
[_dispatchPath] :: ResponseState -> [Text]
[decisionTrace] :: ResponseState -> Trace

-- | Basically Wai's unexported <a>Response</a> type.
data ResponseBody
ResponseFile :: FilePath -> (Maybe FilePart) -> ResponseBody
ResponseBuilder :: Builder -> ResponseBody
ResponseStream :: StreamingBody -> ResponseBody
Empty :: ResponseBody
type ErrorResponses m = Monad m => Map Status [(MediaType, Webmachine m ResponseBody)]

-- | Adds the provided ByteString to the Airship-Trace header.
addTrace :: Monad m => ByteString -> Webmachine m ()

-- | A default, blank request.
--   
--   Since 2.0.0
defaultRequest :: Request

-- | Reads the entirety of the request body in a single string. This turns
--   the chunks obtained from repeated invocations of <a>requestBody</a>
--   into a lazy <a>ByteString</a>.
entireRequestBody :: MonadIO m => Request -> m ByteString
etagToByteString :: ETag -> ByteString
eitherResponse :: Monad m => RequestReader -> ResponseState -> Webmachine m Response -> m (Response, Trace)

-- | Helper function for building a <a>ResponseBuilder</a> out of
--   HTML-escaped text.
escapedResponse :: Text -> ResponseBody

-- | Map both the return value and wrapped computation <tt>m</tt>.
mapWebmachine :: (m1 (Either Response a1, ResponseState) -> m2 (Either Response a2, ResponseState)) -> Webmachine m1 a1 -> Webmachine m2 a2
runWebmachine :: Monad m => RequestReader -> ResponseState -> Webmachine m a -> m (Either Response a, Trace)

-- | Returns the <a>Request</a> that is currently being processed.
request :: Monad m => Webmachine m Request

-- | Returns the time at which this request began processing.
requestTime :: Monad m => Webmachine m UTCTime

-- | Returns the route path that was matched during route evaluation. This
--   is not the path specified in the request, but rather the route in the
--   <tt>RoutingSpec</tt> that matched the request URL. Variables names are
--   prefixed with <tt>:</tt>, and free ("star") paths are designated with
--   <tt>*</tt>.
routePath :: Monad m => Webmachine m Text

-- | Returns the current <a>ResponseHeaders</a>.
getResponseHeaders :: Monad m => Webmachine m ResponseHeaders

-- | Returns the current <a>ResponseBody</a>.
getResponseBody :: Monad m => Webmachine m ResponseBody

-- | Returns the bound routing parameters extracted from the routing system
--   (see <a>Airship.Route</a>).
params :: Monad m => Webmachine m (HashMap Text Text)
dispatchPath :: Monad m => Webmachine m [Text]

-- | Given a new <a>ResponseBody</a>, replaces the stored body with the new
--   one.
putResponseBody :: Monad m => ResponseBody -> Webmachine m ()

-- | Stores the provided <a>ByteString</a> as the responseBody. This is a
--   shortcut for creating a response body with a <a>ResponseBuilder</a>
--   and a bytestring <a>Builder</a>.
putResponseBS :: Monad m => ByteString -> Webmachine m ()

-- | Immediately halts processing with the provided <a>Status</a> code. The
--   contents of the <tt>Webmachine'</tt>s response body will be streamed
--   back to the client. This is a shortcut for constructing a
--   <a>Response</a> with <a>getResponseHeaders</a> and
--   <a>getResponseBody</a> and passing that response to <a>finishWith</a>.
halt :: Monad m => Status -> Webmachine m a

-- | Immediately halts processing and writes the provided <a>Response</a>
--   back to the client.
finishWith :: Monad m => Response -> Webmachine m a
instance GHC.Base.Monad m => Control.Monad.State.Class.MonadState Airship.Types.ResponseState (Airship.Types.Webmachine m)
instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader Airship.Types.RequestReader (Airship.Types.Webmachine m)
instance Control.Monad.Base.MonadBase b m => Control.Monad.Base.MonadBase b (Airship.Types.Webmachine m)
instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Airship.Types.Webmachine m)
instance GHC.Base.Monad m => GHC.Base.Monad (Airship.Types.Webmachine m)
instance GHC.Base.Monad m => GHC.Base.Applicative (Airship.Types.Webmachine m)
instance GHC.Base.Functor m => GHC.Base.Functor (Airship.Types.Webmachine m)
instance GHC.Classes.Ord Airship.Types.ETag
instance GHC.Classes.Eq Airship.Types.ETag
instance Control.Monad.Trans.Control.MonadBaseControl b m => Control.Monad.Trans.Control.MonadBaseControl b (Airship.Types.Webmachine m)
instance Control.Monad.Trans.Class.MonadTrans Airship.Types.Webmachine
instance GHC.Show.Show Airship.Types.ETag

module Airship.Resource
data Resource m
Resource :: Webmachine m Bool -> Webmachine m [Method] -> Webmachine m [(MediaType, Webmachine m ())] -> Webmachine m [(MediaType, Webmachine m ResponseBody)] -> Webmachine m Bool -> Webmachine m Bool -> Webmachine m Bool -> Webmachine m Bool -> Webmachine m (Maybe ETag) -> Webmachine m Bool -> Webmachine m Bool -> Webmachine m Bool -> Webmachine m Bool -> Webmachine m (Maybe UTCTime) -> Webmachine m Bool -> Webmachine m Bool -> Webmachine m (Maybe ByteString) -> Webmachine m (Maybe ByteString) -> Webmachine m Bool -> Webmachine m [(MediaType, Webmachine m ())] -> Webmachine m Bool -> Webmachine m (PostResponse m) -> Webmachine m Bool -> Webmachine m Bool -> Webmachine m Bool -> Webmachine m Bool -> ErrorResponses m -> Resource m

-- | Whether to allow HTTP POSTs to a missing resource. Default: false.
[allowMissingPost] :: Resource m -> Webmachine m Bool

-- | The set of HTTP methods that this resource allows. Default:
--   <tt>GET</tt> and <tt>HEAD</tt>. If a request arrives with an HTTP
--   method not included herein, <tt>501 Not Implemented</tt> is returned.
[allowedMethods] :: Resource m -> Webmachine m [Method]

-- | An association list of <a>MediaType</a>s and <a>Webmachine</a> actions
--   that correspond to the accepted <tt>Content-Type</tt> values that this
--   resource can accept in a request body. If a <tt>Content-Type</tt>
--   header is present but not accounted for in
--   <a>contentTypesAccepted</a>, processing will halt with <tt>415
--   Unsupported Media Type</tt>. Otherwise, the corresponding
--   <a>Webmachine</a> action will be executed and processing will
--   continue.
[contentTypesAccepted] :: Resource m -> Webmachine m [(MediaType, Webmachine m ())]

-- | An association list of <a>MediaType</a> values and <a>ResponseBody</a>
--   values. The response will be chosen by looking up the <a>MediaType</a>
--   that most closely matches the <tt>Accept</tt> header. Should there be
--   no match, processing will halt with <tt>406 Not Acceptable</tt>.
[contentTypesProvided] :: Resource m -> Webmachine m [(MediaType, Webmachine m ResponseBody)]

-- | When a <tt>DELETE</tt> request is enacted (via a <tt>True</tt> value
--   returned from <a>deleteResource</a>), a <tt>False</tt> value returns a
--   <tt>202 Accepted</tt> response. Returning <tt>True</tt> will continue
--   processing, usually ending up with a <tt>204 No Content</tt> response.
--   Default: False.
[deleteCompleted] :: Resource m -> Webmachine m Bool

-- | When processing a <tt>DELETE</tt> request, a <tt>True</tt> value
--   allows processing to continue. Returns <tt>500 Forbidden</tt> if
--   False. Default: false.
[deleteResource] :: Resource m -> Webmachine m Bool

-- | Returns <tt>413 Request Entity Too Large</tt> if true. Default: false.
[entityTooLarge] :: Resource m -> Webmachine m Bool

-- | Checks if the given request is allowed to access this resource.
--   Returns <tt>403 Forbidden</tt> if true. Default: false.
[forbidden] :: Resource m -> Webmachine m Bool

-- | If this returns a non-<a>Nothing</a> <a>ETag</a>, its value will be
--   added to every HTTP response in the <tt>ETag:</tt> field.
[generateETag] :: Resource m -> Webmachine m (Maybe ETag)

-- | Checks if this resource has actually implemented a handler for a given
--   HTTP method. Returns <tt>501 Not Implemented</tt> if false. Default:
--   true.
[implemented] :: Resource m -> Webmachine m Bool

-- | Returns <tt>401 Unauthorized</tt> if false. Default: true.
[isAuthorized] :: Resource m -> Webmachine m Bool

-- | When processing <tt>PUT</tt> requests, a <tt>True</tt> value returned
--   here will halt processing with a <tt>409 Conflict</tt>.
[isConflict] :: Resource m -> Webmachine m Bool

-- | Returns <tt>415 Unsupported Media Type</tt> if false. We recommend you
--   use the <tt>contentTypeMatches</tt> helper function, which accepts a
--   list of <a>MediaType</a> values, so as to simplify proper MIME type
--   handling. Default: true.
[knownContentType] :: Resource m -> Webmachine m Bool

-- | In the presence of an <tt>If-Modified-Since</tt> header, returning a
--   <tt>Just</tt> value from <tt>lastModifed</tt> allows the server to
--   halt with <tt>304 Not Modified</tt> if appropriate.
[lastModified] :: Resource m -> Webmachine m (Maybe UTCTime)

-- | If an <tt>Accept-Language</tt> value is present in the HTTP request,
--   and this function returns <tt>False</tt>, processing will halt with
--   <tt>406 Not Acceptable</tt>.
[languageAvailable] :: Resource m -> Webmachine m Bool

-- | Returns <tt>400 Bad Request</tt> if true. Default: false.
[malformedRequest] :: Resource m -> Webmachine m Bool

-- | When processing a resource for which <a>resourceExists</a> returned
--   <tt>False</tt>, returning a <tt>Just</tt> value halts with a <tt>301
--   Moved Permanently</tt> response. The contained <a>ByteString</a> will
--   be added to the HTTP response under the <tt>Location:</tt> header.
[movedPermanently] :: Resource m -> Webmachine m (Maybe ByteString)

-- | Like <a>movedPermanently</a>, except with a <tt>307 Moved
--   Temporarily</tt> response.
[movedTemporarily] :: Resource m -> Webmachine m (Maybe ByteString)

-- | When handling a <tt>PUT</tt> request, returning <tt>True</tt> here
--   halts processing with <tt>300 Multiple Choices</tt>. Default: False.
[multipleChoices] :: Resource m -> Webmachine m Bool

-- | As <a>contentTypesAccepted</a>, but checked and executed specifically
--   in the case of a PATCH request.
[patchContentTypesAccepted] :: Resource m -> Webmachine m [(MediaType, Webmachine m ())]

-- | When processing a request for which <a>resourceExists</a> returned
--   <tt>False</tt>, returning <tt>True</tt> here allows the
--   <a>movedPermanently</a> and <a>movedTemporarily</a> functions to
--   process the request.
[previouslyExisted] :: Resource m -> Webmachine m Bool

-- | When handling <tt>POST</tt> requests, the value returned determines
--   whether to treat the request as a <tt>PUT</tt>, a <tt>PUT</tt> and a
--   redirect, or a plain <tt>POST</tt>. See the documentation for
--   <a>PostResponse</a> for more information. The default implemetation
--   returns a <a>PostProcess</a> with an empty handler.
[processPost] :: Resource m -> Webmachine m (PostResponse m)

-- | Does the resource at this path exist? Returning false from this
--   usually entails a <tt>404 Not Found</tt> response. (If
--   <a>allowMissingPost</a> returns <tt>True</tt> or an <tt>If-Match:
--   *</tt> header is present, it may not).
[resourceExists] :: Resource m -> Webmachine m Bool

-- | Returns <tt>503 Service Unavailable</tt> if false. Default: true.
[serviceAvailable] :: Resource m -> Webmachine m Bool

-- | Returns <tt>414 Request URI Too Long</tt> if true. Default: false.
[uriTooLong] :: Resource m -> Webmachine m Bool

-- | Returns <tt>501 Not Implemented</tt> if false. Default: true.
[validContentHeaders] :: Resource m -> Webmachine m Bool
[errorResponses] :: Resource m -> ErrorResponses m

-- | Used when processing POST requests so as to handle the outcome of the
--   binary decisions between handling a POST as a create request and
--   whether to redirect after the POST is done. Credit for this idea goes
--   to Richard Wallace (purefn) on Webcrank.
--   
--   For processing the POST, an association list of <a>MediaType</a>s and
--   <a>Webmachine</a> actions are required that correspond to the accepted
--   <tt>Content-Type</tt> values that this resource can accept in a
--   request body. If a <tt>Content-Type</tt> header is present but not
--   accounted for, processing will halt with <tt>415 Unsupported Media
--   Type</tt>.
data PostResponse m

-- | Treat this request as a PUT.
PostCreate :: [Text] -> PostResponse m

-- | Treat this request as a PUT, then redirect.
PostCreateRedirect :: [Text] -> PostResponse m

-- | Process as a POST, but don't redirect.
PostProcess :: [(MediaType, Webmachine m ())] -> PostResponse m

-- | Process and redirect.
PostProcessRedirect :: [(MediaType, Webmachine m ByteString)] -> PostResponse m

-- | A helper function that terminates execution with <tt>500 Internal
--   Server Error</tt>.
serverError :: Monad m => Webmachine m a

-- | The default Airship resource, with "sensible" values filled in for
--   each entry. You construct new resources by extending the default
--   resource with your own handlers.
defaultResource :: Monad m => Resource m

module Airship.Route

-- | <a>Route</a>s represent chunks of text used to match over URLs. You
--   match hardcoded paths with string literals (and the
--   <tt>-XOverloadedStrings</tt> extension), named variables with the
--   <a>var</a> combinator, and wildcards with <a>star</a>.
data Route

-- | Represents a fully-specified set of routes that map paths (represented
--   as <a>Route</a>s) to <a>Resource</a>s. <a>RoutingSpec</a>s are
--   declared with do-notation, to wit:
--   
--   <pre>
--   myRoutes :: RoutingSpec IO ()
--   myRoutes = do
--     root                                 #&gt; myRootResource
--     "blog" <a>&lt;/&gt;</a> var "date" <a>&lt;/&gt;</a> var "post" #&gt; blogPostResource
--     "about"                              #&gt; aboutResource
--     "anything" <a>&lt;/&gt;</a> star                  #&gt; wildcardResource
--   </pre>
data RoutingSpec m a
data RouteLeaf m

-- | A map from <a>ByteString</a>s to <tt>a</tt>. For all the generic
--   functions, note that tries are strict in the <tt>Maybe</tt> but not in
--   <tt>a</tt>.
--   
--   The <a>Monad</a> instance is strange. If a key <tt>k1</tt> is a prefix
--   of other keys, then results from binding the value at <tt>k1</tt> will
--   override values from longer keys when they collide. If this is useful
--   for anything, or if there's a more sensible instance, I'd be curious
--   to know.
data Trie a :: * -> *

-- | Represents the root resource (<tt>/</tt>). This should usually be the
--   first path declared in a <a>RoutingSpec</a>.
root :: Route

-- | Captures a named in a route and adds it to the <tt>routingParams</tt>
--   hashmap under the provided <a>Text</a> value. For example,
--   
--   <pre>
--   "blog" <a>&lt;/&gt;</a> <a>var</a> "date" <a>&lt;/&gt;</a> <a>var</a> "post"
--   </pre>
--   
--   will capture all URLs of the form <tt>/blog/$date/$post</tt>, and add
--   <tt>date</tt> and <tt>post</tt> to the <tt>routingParams</tt>
--   contained within the resource this route maps to.
var :: Text -> Route

-- | Captures a wildcard route. For example,
--   
--   <pre>
--   "emcees" <a>&lt;/&gt;</a> star
--   </pre>
--   
--   will match <tt>/emcees</tt>, <tt>/emcees/biggie</tt>,
--   <tt>/emcees/earl/vince</tt>, and so on and so forth.
star :: Route

-- | <tt>a <a>&lt;/&gt;</a> b</tt> separates the path components <tt>a</tt>
--   and <tt>b</tt> with a slash. This is actually just a synonym for
--   <a>mappend</a>.
(</>) :: Route -> Route -> Route
(#>) :: MonadWriter [(ByteString, (RouteLeaf a))] m => Route -> Resource a -> m ()
(#>=) :: MonadWriter [(ByteString, (RouteLeaf a))] m => Route -> m (Resource a) -> m ()

-- | Turns the list of routes in a <a>RoutingSpec</a> into a <a>Trie</a>
--   for efficient routing
runRouter :: RoutingSpec m a -> Trie (RouteLeaf m)

module Airship.Headers

-- | Adds a given <a>Header</a> to this handler's <a>ResponseState</a>.
addResponseHeader :: Monad m => Header -> Webmachine m ()

-- | Applies the given function to the <a>ResponseHeaders</a> present in
--   this handlers <a>ResponseState</a>.
modifyResponseHeaders :: Monad m => (ResponseHeaders -> ResponseHeaders) -> Webmachine m ()

module Airship.Resource.Static
data FileInfo
FileInfo :: FilePath -> Integer -> UTCTime -> ETag -> FileInfo
[_path] :: FileInfo -> FilePath
[_size] :: FileInfo -> Integer
[_lastModified] :: FileInfo -> UTCTime
[_etag] :: FileInfo -> ETag
data StaticOptions
Cache :: StaticOptions
NoCache :: StaticOptions
staticResource :: Monad m => StaticOptions -> FilePath -> IO (Resource m)
allFilesAtRoot :: FilePath -> IO [FilePath]
epochToUTCTime :: EpochTime -> UTCTime
directoryTree :: FilePath -> IO FileTree
instance GHC.Classes.Eq Airship.Resource.Static.StaticOptions
instance GHC.Classes.Ord Airship.Resource.Static.FileInfo
instance GHC.Classes.Eq Airship.Resource.Static.FileInfo
instance GHC.Show.Show Airship.Resource.Static.FileInfo

module Airship.Helpers

-- | Parse form data uploaded with a <tt>Content-Type</tt> of either
--   <tt>www-form-urlencoded</tt> or <tt>multipart/form-data</tt> to return
--   a list of parameter names and values and a list of uploaded files and
--   their information.
parseFormData :: Request -> IO ([Param], [File ByteString])

-- | Returns <tt>True</tt> if the request's <tt>Content-Type</tt> header is
--   one of the provided media types. If the <tt>Content-Type</tt> header
--   is not present, this function will return True.
contentTypeMatches :: Monad m => [MediaType] -> Webmachine m Bool

-- | Issue an HTTP 302 (Found) response, with <tt>location</tt> as the
--   destination.
redirectTemporarily :: Monad m => ByteString -> Webmachine m a

-- | Issue an HTTP 301 (Moved Permantently) response, with
--   <tt>location</tt> as the destination.
redirectPermanently :: Monad m => ByteString -> Webmachine m a

-- | Given a <a>RoutingSpec</a>, a 404 resource, and a user state
--   <tt>s</tt>, construct a WAI <tt>Application</tt>.
resourceToWai :: AirshipConfig -> RoutingSpec IO () -> ErrorResponses IO -> Application

-- | Given a 'AirshipConfig, a function to modify the <a>Response</a> based
--   on the <a>AirshipRequest</a> and the <a>Response</a> (like WAI
--   middleware), a 'RoutingSpec, and <a>ErrorResponses</a> construct a WAI
--   <tt>Application</tt>.
resourceToWaiT :: Monad m => AirshipConfig -> (AirshipRequest -> m Response -> IO Response) -> RoutingSpec m () -> ErrorResponses m -> Application

-- | Like <a>resourceToWaiT</a>, but expects the <a>RoutingSpec</a> to have
--   been evaluated with <a>runRouter</a>. This is more efficient than
--   <a>resourceToWaiT</a>, as the routes will not be evaluated on every
--   request.
--   
--   Given <tt>routes :: RoutingSpec IO ()</tt>, <a>resourceToWaiT'</a> can
--   be invoked like so:
--   
--   <pre>
--   resourceToWaiT' cfg (const id) (runRouter routes) errors
--   </pre>
resourceToWaiT' :: Monad m => AirshipConfig -> (AirshipRequest -> m Response -> IO Response) -> Trie (RouteLeaf m) -> ErrorResponses m -> Application
appendRequestPath :: Monad m => [Text] -> Webmachine m ByteString

-- | Lookup routing parameter and return 500 Internal Server Error if not
--   found. Not finding the paramter usually means the route doesn't match
--   what the resource is expecting.
lookupParam :: Monad m => Text -> Webmachine m Text

-- | Lookup routing parameter.
lookupParam' :: Monad m => Text -> Webmachine m (Maybe Text)

module Airship
