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


-- | A minimalist web framework for the WAI server interface
--   
--   Simple is "framework-less" web framework for Haskell web applications
--   based on the WAI server interface (e.g. for use with the warp server).
--   Simple does not enforce a particular structure or paradigm for web
--   applications. Rather, Simple contains tools to help you create your
--   own patterns (or re-create existing ones). Simple is minimalist,
--   providing a lightweight base - the most basic Simple app is little
--   more than a WAI <a>Application</a> with some routing logic. Everything
--   else (e.g. authentication, controllers, persistence, caching etc') is
--   provided in composable units, so you can include only the ones you
--   need in your app, and easily replace with your own components.
--   
--   To get started, create an app skeleton with the <a>smpl</a> utility:
--   
--   <pre>
--   $ cabal install simple
--   $ smpl create my_app_name
--   $ cd my_app_name
--   $ smpl
--   </pre>
--   
--   See <a>Web.Simple</a> for a more detailed introduction.
@package simple
@version 0.11.2


-- | This module defines some convenience functions for creating responses.
module Web.Simple.Responses

-- | Creates a 200 (OK) <a>Response</a> with the given content-type and
--   resposne body
ok :: ContentType -> ByteString -> Response

-- | Creates a 200 (OK) <a>Response</a> with content-type "text/html" and
--   the given resposne body
okHtml :: ByteString -> Response

-- | Creates a 200 (OK) <a>Response</a> with content-type
--   "application/json" and the given resposne body
okJson :: ByteString -> Response

-- | Creates a 200 (OK) <a>Response</a> with content-type "application/xml"
--   and the given resposne body
okXml :: ByteString -> Response

-- | Given a URL returns a 301 (Moved Permanently) <a>Response</a>
--   redirecting to that URL.
movedTo :: String -> Response

-- | Given a URL returns a 303 (See Other) <a>Response</a> redirecting to
--   that URL.
redirectTo :: ByteString -> Response

-- | Returns a 400 (Bad Request) <a>Response</a>.
badRequest :: Response

-- | Returns a 401 (Authorization Required) <a>Response</a> requiring basic
--   authentication in the given realm.
requireBasicAuth :: String -> Response

-- | Returns a 403 (Forbidden) <a>Response</a>.
forbidden :: Response

-- | Returns a 404 (Not Found) <a>Response</a>.
notFound :: Response

-- | Returns a 500 (Server Error) <a>Response</a>.
serverError :: ByteString -> Response


-- | <a>ControllerT</a> provides a convenient syntax for writting
--   <a>Application</a> code as a Monadic action with access to an HTTP
--   request as well as app specific data (e.g. a database connection pool,
--   app configuration etc.) This module also defines some helper functions
--   that leverage this feature. For example, <a>redirectBack</a> reads the
--   underlying request to extract the referer and returns a redirect
--   response:
--   
--   <pre>
--   myControllerT = do
--     ...
--     if badLogin then
--       redirectBack
--       else
--         ...
--   
--   </pre>
module Web.Simple.Controller.Trans

-- | The ControllerT Monad is both a State-like monad which, when run,
--   computes either a <a>Response</a> or a result. Within the ControllerT
--   Monad, the remainder of the computation can be short-circuited by
--   <a>respond</a>ing with a <a>Response</a>.
newtype ControllerT s m a
ControllerT :: (s -> Request -> m (Either Response a, s)) -> ControllerT s m a
[runController] :: ControllerT s m a -> s -> Request -> m (Either Response a, s)
hoistEither :: Monad m => Either Response a -> ControllerT s m a

-- | Extract the request
request :: Monad m => ControllerT s m Request

-- | Modify the request for the given computation
localRequest :: Monad m => (Request -> Request) -> ControllerT s m a -> ControllerT s m a

-- | Extract the application-specific state
controllerState :: Monad m => ControllerT s m s
putState :: Monad m => s -> ControllerT s m ()

-- | Convert the controller into an <a>Application</a>
controllerApp :: Monad m => s -> ControllerT s m a -> SimpleApplication m

-- | Provide a response
--   
--   <pre>
--   respond r &gt;&gt;= f === respond r
--   </pre>
respond :: Monad m => Response -> ControllerT s m a

-- | Lift an application to a controller
fromApp :: Monad m => (Request -> m Response) -> ControllerT s m ()

-- | Matches on the hostname from the <a>Request</a>. The route only
--   succeeds on exact matches.
routeHost :: Monad m => ByteString -> ControllerT s m a -> ControllerT s m ()

-- | Matches if the path is empty.
--   
--   Note that this route checks that <a>pathInfo</a> is empty, so it works
--   as expected in nested contexts that have popped components from the
--   <a>pathInfo</a> list.
routeTop :: Monad m => ControllerT s m a -> ControllerT s m ()

-- | Matches on the HTTP request method (e.g. <a>GET</a>, <a>POST</a>,
--   <a>PUT</a>)
routeMethod :: Monad m => StdMethod -> ControllerT s m a -> ControllerT s m ()

-- | Matches if the request's Content-Type exactly matches the given string
routeAccept :: Monad m => ByteString -> ControllerT s m a -> ControllerT s m ()

-- | Routes the given URL pattern. Patterns can include directories as well
--   as variable patterns (prefixed with <tt>:</tt>) to be added to
--   <a>queryString</a> (see <a>routeVar</a>)
--   
--   <ul>
--   <li>/posts/:id</li>
--   <li>/posts/:id/new</li>
--   <li>/:date/posts/:category/new</li>
--   </ul>
routePattern :: Monad m => Text -> ControllerT s m a -> ControllerT s m ()

-- | Matches if the first directory in the path matches the given
--   <tt>ByteString</tt>
routeName :: Monad m => Text -> ControllerT s m a -> ControllerT s m ()

-- | Always matches if there is at least one directory in <a>pathInfo</a>
--   but and adds a parameter to <a>queryString</a> where the key is the
--   first parameter and the value is the directory consumed from the path.
routeVar :: Monad m => Text -> ControllerT s m a -> ControllerT s m ()

-- | Looks up the parameter name in the request's query string and returns
--   the <tt>Parseable</tt> value or <a>Nothing</a>.
--   
--   For example, for a request with query string: "?foo=bar&amp;baz=7",
--   <tt>queryParam "foo"</tt> would return <tt>Just "bar"</tt>, but
--   <tt>queryParam "zap"</tt> would return <tt>Nothing</tt>.
queryParam :: (Monad m, Parseable a) => ByteString -> ControllerT s m (Maybe a)

-- | Like <a>queryParam</a>, but throws an exception if the parameter is
--   not present.
queryParam' :: (Monad m, Parseable a) => ByteString -> ControllerT s m a

-- | Selects all values with the given parameter name
queryParams :: (Monad m, Parseable a) => ByteString -> ControllerT s m [a]

-- | The class of types into which query parameters may be converted
class Parseable a
parse :: Parseable a => ByteString -> a

-- | Like <a>queryParam</a>, but further processes the parameter value with
--   <tt>read</tt>. If that conversion fails, an exception is thrown.
readQueryParam :: (Monad m, Read a) => ByteString -> ControllerT s m (Maybe a)

-- | Like <a>readQueryParam</a>, but throws an exception if the parameter
--   is not present.
readQueryParam' :: (Monad m, Read a) => ByteString -> ControllerT s m a

-- | Like <a>queryParams</a>, but further processes the parameter values
--   with <tt>read</tt>. If any read-conversion fails, an exception is
--   thrown.
readQueryParams :: (Monad m, Read a) => ByteString -> ControllerT s m [a]
readParamValue :: (Monad m, Read a) => ByteString -> Text -> ControllerT s m a

-- | Returns the value of the given request header or <a>Nothing</a> if it
--   is not present in the HTTP request.
requestHeader :: Monad m => HeaderName -> ControllerT s m (Maybe ByteString)

-- | Redirect back to the referer. If the referer header is not present
--   redirect to root (i.e., <tt>/</tt>).
redirectBack :: Monad m => ControllerT s m ()

-- | Redirect back to the referer. If the referer header is not present
--   fallback on the given <a>Response</a>.
redirectBackOr :: Monad m => Response -> ControllerT s m ()

-- | Like <a>Application</a>, but with <tt>m</tt> as the underlying monad
type SimpleApplication m = Request -> m Response

-- | Like <a>Application</a>, but with <tt>m</tt> as the underlying monad
type SimpleMiddleware m = SimpleApplication m -> SimpleApplication m
guard :: Monad m => Bool -> ControllerT s m a -> ControllerT s m ()
guardM :: Monad m => ControllerT s m Bool -> ControllerT s m a -> ControllerT s m ()
guardReq :: Monad m => (Request -> Bool) -> ControllerT s m a -> ControllerT s m ()
data ControllerException
ControllerException :: String -> ControllerException
err :: String -> ControllerT s m a
instance GHC.Base.Functor m => GHC.Base.Functor (Web.Simple.Controller.Trans.ControllerT s m)
instance (GHC.Base.Monad m, GHC.Base.Functor m) => GHC.Base.Applicative (Web.Simple.Controller.Trans.ControllerT s m)
instance GHC.Base.Monad m => GHC.Base.Monad (Web.Simple.Controller.Trans.ControllerT s m)
instance (GHC.Base.Functor m, GHC.Base.Monad m) => GHC.Base.Alternative (Web.Simple.Controller.Trans.ControllerT s m)
instance GHC.Base.Monad m => GHC.Base.MonadPlus (Web.Simple.Controller.Trans.ControllerT s m)
instance Control.Monad.Trans.Class.MonadTrans (Web.Simple.Controller.Trans.ControllerT s)
instance GHC.Base.Monad m => Control.Monad.State.Class.MonadState s (Web.Simple.Controller.Trans.ControllerT s m)
instance GHC.Base.Monad m => Control.Monad.Reader.Class.MonadReader Network.Wai.Internal.Request (Web.Simple.Controller.Trans.ControllerT s m)
instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (Web.Simple.Controller.Trans.ControllerT s m)
instance (GHC.Base.Applicative m, GHC.Base.Monad m, Control.Monad.Base.MonadBase m m) => Control.Monad.Base.MonadBase m (Web.Simple.Controller.Trans.ControllerT s m)
instance Control.Monad.Trans.Control.MonadBaseControl m m => Control.Monad.Trans.Control.MonadBaseControl m (Web.Simple.Controller.Trans.ControllerT s m)
instance Web.Simple.Controller.Trans.Parseable Data.ByteString.Internal.ByteString
instance Web.Simple.Controller.Trans.Parseable GHC.Base.String
instance Web.Simple.Controller.Trans.Parseable Data.Text.Internal.Text
instance GHC.Show.Show Web.Simple.Controller.Trans.ControllerException
instance GHC.Exception.Exception Web.Simple.Controller.Trans.ControllerException

module Web.Simple.Templates
class Monad m => HasTemplates m hs where defaultLayout = return Nothing viewDirectory = return "views" functionMap = return defaultFunctionMap getTemplate = defaultGetTemplate layoutObject = defaultLayoutObject

-- | The layout to use by default. Layouts are just templates that embed
--   views. They are rendered with the a global object containing the
--   rendered view in the "yield" field, and the object the view was
--   rendered with in the "page" field. By default, no template is used.
defaultLayout :: HasTemplates m hs => ControllerT hs m (Maybe Template)

-- | The directory to look for views passed to <a>render</a>. This defaults
--   to "views", so
--   
--   <pre>
--   render "index.html.tmpl" ...
--   </pre>
--   
--   will look for a view template in "views/index.html.tmpl".
viewDirectory :: HasTemplates m hs => ControllerT hs m FilePath

-- | A map of pure functions that can be called from within a template. See
--   <a>FunctionMap</a> and <a>Function</a> for details.
functionMap :: HasTemplates m hs => ControllerT hs m FunctionMap

-- | Function to use to get a template. By default, it looks in the
--   <a>viewDirectory</a> for the given file name and compiles the file
--   into a template. This can be overriden to, for example, cache compiled
--   templates in memory.
getTemplate :: HasTemplates m hs => FilePath -> ControllerT hs m Template

-- | Function to use to get a template. By default, it looks in the
--   <a>viewDirectory</a> for the given file name and compiles the file
--   into a template. This can be overriden to, for example, cache compiled
--   templates in memory.
getTemplate :: (HasTemplates m hs, MonadIO m) => FilePath -> ControllerT hs m Template

-- | The <a>Value</a> passed to a layout given the rendered view template
--   and the value originally passed to the view template. By default,
--   produces an <a>Object</a> with "yield", containing the rendered view,
--   and "page", containing the value originally passed to the view.
layoutObject :: (HasTemplates m hs, ToJSON pageContent, ToJSON pageVal) => pageContent -> pageVal -> ControllerT hs m Value

-- | Renders a view template with the default layout and a global used to
--   evaluate variables in the template.
render :: (HasTemplates m hs, Monad m, ToJSON a) => FilePath -> a -> ControllerT hs m ()

-- | Same as <a>render</a> but without a template.
renderPlain :: (HasTemplates m hs, ToJSON a) => FilePath -> a -> ControllerT hs m ()

-- | Render a view using the layout named by the first argument.
renderLayout :: (HasTemplates m hs, ToJSON a) => FilePath -> FilePath -> a -> ControllerT hs m ()

-- | Same as <a>renderLayout</a> but uses already compiled layouts.
renderLayoutTmpl :: (HasTemplates m hs, ToJSON a) => Template -> Template -> a -> ByteString -> ControllerT hs m ()
defaultGetTemplate :: (HasTemplates m hs, MonadIO m) => FilePath -> ControllerT hs m Template
defaultFunctionMap :: FunctionMap
defaultLayoutObject :: (HasTemplates m hs, ToJSON pageContent, ToJSON pageVal) => pageContent -> pageVal -> ControllerT hs m Value

-- | <i>O(n*log n)</i> Construct a map with the supplied mappings. If the
--   list contains duplicate mappings, the later mappings take precedence.
fromList :: (Eq k, Hashable k) => [(k, v)] -> HashMap k v

-- | A funcation that's callable from inside a template
newtype Function :: *
Function :: ([Value] -> Value) -> Function
[call] :: Function -> [Value] -> Value
class ToFunction a
toFunction :: ToFunction a => a -> Function
type FunctionMap = HashMap Identifier Function


-- | <a>Controller</a> provides a convenient syntax for writting
--   <a>Application</a> code as a Monadic action with access to an HTTP
--   request as well as app specific data (e.g. a database connection pool,
--   app configuration etc.) This module also defines some helper functions
--   that leverage this feature. For example, <a>redirectBack</a> reads the
--   underlying request to extract the referer and returns a redirect
--   response:
--   
--   <pre>
--   myController = do
--     ...
--     if badLogin then
--       redirectBack
--       else
--         ...
--   
--   </pre>
module Web.Simple.Controller

-- | The Controller Monad is both a State-like monad which, when run,
--   computes either a <a>Response</a> or a result. Within the Controller
--   Monad, the remainder of the computation can be short-circuited by
--   <a>respond</a>ing with a <a>Response</a>.
type Controller s = ControllerT s IO

-- | The ControllerT Monad is both a State-like monad which, when run,
--   computes either a <a>Response</a> or a result. Within the ControllerT
--   Monad, the remainder of the computation can be short-circuited by
--   <a>respond</a>ing with a <a>Response</a>.
newtype ControllerT s m a
ControllerT :: (s -> Request -> m (Either Response a, s)) -> ControllerT s m a
[runController] :: ControllerT s m a -> s -> Request -> m (Either Response a, s)

-- | Convert the controller into an <a>Application</a>
controllerApp :: s -> Controller s a -> Application

-- | Extract the application-specific state
controllerState :: Controller s s
putState :: s -> Controller s ()

-- | Extract the request
request :: Controller s Request

-- | Modify the request for the given computation
localRequest :: (Request -> Request) -> Controller s a -> Controller s a

-- | Provide a response
--   
--   <pre>
--   respond r &gt;&gt;= f === respond r
--   </pre>
respond :: Response -> Controller s a

-- | Returns the value of the given request header or <a>Nothing</a> if it
--   is not present in the HTTP request.
requestHeader :: HeaderName -> Controller s (Maybe ByteString)

-- | Matches on the hostname from the <a>Request</a>. The route only
--   succeeds on exact matches.
routeHost :: ByteString -> Controller s a -> Controller s ()

-- | Matches if the path is empty.
--   
--   Note that this route checks that <a>pathInfo</a> is empty, so it works
--   as expected in nested contexts that have popped components from the
--   <a>pathInfo</a> list.
routeTop :: Controller s a -> Controller s ()

-- | Matches on the HTTP request method (e.g. <a>GET</a>, <a>POST</a>,
--   <a>PUT</a>)
routeMethod :: StdMethod -> Controller s a -> Controller s ()

-- | Matches if the request's Content-Type exactly matches the given string
routeAccept :: ByteString -> Controller s a -> Controller s ()

-- | Routes the given URL pattern. Patterns can include directories as well
--   as variable patterns (prefixed with <tt>:</tt>) to be added to
--   <a>queryString</a> (see <a>routeVar</a>)
--   
--   <ul>
--   <li>/posts/:id</li>
--   <li>/posts/:id/new</li>
--   <li>/:date/posts/:category/new</li>
--   </ul>
routePattern :: Text -> Controller s a -> Controller s ()

-- | Matches if the first directory in the path matches the given
--   <tt>ByteString</tt>
routeName :: Text -> Controller s a -> Controller s ()

-- | Always matches if there is at least one directory in <a>pathInfo</a>
--   but and adds a parameter to <a>queryString</a> where the key is the
--   first parameter and the value is the directory consumed from the path.
routeVar :: Text -> Controller s a -> Controller s ()

-- | The class of types into which query parameters may be converted
class Parseable a

-- | Looks up the parameter name in the request's query string and returns
--   the <tt>Parseable</tt> value or <a>Nothing</a>.
--   
--   For example, for a request with query string: "?foo=bar&amp;baz=7",
--   <tt>queryParam "foo"</tt> would return <tt>Just "bar"</tt>, but
--   <tt>queryParam "zap"</tt> would return <tt>Nothing</tt>.
queryParam :: Parseable a => ByteString -> Controller s (Maybe a)

-- | Like <a>queryParam</a>, but throws an exception if the parameter is
--   not present.
queryParam' :: Parseable a => ByteString -> Controller s a

-- | Selects all values with the given parameter name
queryParams :: Parseable a => ByteString -> Controller s [a]

-- | Like <a>queryParam</a>, but further processes the parameter value with
--   <tt>read</tt>. If that conversion fails, an exception is thrown.
readQueryParam :: Read a => ByteString -> Controller s (Maybe a)

-- | Like <a>readQueryParam</a>, but throws an exception if the parameter
--   is not present.
readQueryParam' :: Read a => ByteString -> Controller s a

-- | Like <a>queryParams</a>, but further processes the parameter values
--   with <tt>read</tt>. If any read-conversion fails, an exception is
--   thrown.
readQueryParams :: Read a => ByteString -> Controller s [a]

-- | Parses a HTML form from the request body. It returns a list of
--   <a>Param</a>s as well as a list of <a>File</a>s, which are pairs
--   mapping the name of a <i>file</i> form field to a <a>FileInfo</a>
--   pointing to a temporary file with the contents of the upload.
--   
--   <pre>
--   myControllerT = do
--     (prms, files) &lt;- parseForm
--     let mPicFile = lookup "profile_pic" files
--     case mPicFile of
--       Just (picFile) -&gt; do
--         sourceFile (fileContent picFile) $$
--           sinkFile ("images/" ++ (fileName picFile))
--         respond $ redirectTo "/"
--       Nothing -&gt; redirectBack
--   </pre>
parseForm :: Controller s ([Param], [(ByteString, FileInfo ByteString)])

-- | Redirect back to the referer. If the referer header is not present
--   redirect to root (i.e., <tt>/</tt>).
redirectBack :: Controller s a

-- | Redirect back to the referer. If the referer header is not present
--   fallback on the given <a>Response</a>.
redirectBackOr :: Response -> Controller s a
data ControllerException

-- | Reads and returns the body of the HTTP request.
body :: Controller s ByteString
hoistEither :: Either Response a -> Controller s a

module Web.Simple.Controller.Exception
onException :: Controller s a -> Controller s b -> Controller s a
finally :: Controller s a -> Controller s b -> Controller s a
bracket :: Controller s a -> (a -> Controller s b) -> (a -> Controller s c) -> Controller s c
handle :: Exception e => (e -> Controller s a) -> Controller s a -> Controller s a

module Web.Simple.Static
serveStatic :: FilePath -> Controller a ()


-- | Provides HTTP Basic Authentication.
module Web.Simple.Auth

-- | An <a>AuthRouter</a> authenticates a <a>Request</a> and, if
--   successful, forwards the <a>Request</a> to the <tt>Routeable</tt>.
type AuthRouter r a = (Request -> ByteString -> ByteString -> Controller r (Maybe Request)) -> Controller r a -> Controller r a

-- | An <a>AuthRouter</a> that uses HTTP basic authentication to
--   authenticate a request in a particular realm.
basicAuthRoute :: String -> AuthRouter r a

-- | A <tt>Route</tt> that uses HTTP basic authentication to authenticate a
--   request for a realm with the given username ans password. The request
--   is rewritten with an 'X-User' header containing the authenticated
--   username before being passed to the next <tt>Route</tt>.
basicAuth :: String -> ByteString -> ByteString -> Controller r a -> Controller r a

-- | Wraps an <a>AuthRouter</a> to take a simpler authentication function
--   (that just just takes a username and password, and returns <a>True</a>
--   or <a>False</a>). It also adds an "X-User" header to the
--   <a>Request</a> with the authenticated user's name (the first argument
--   to the authentication function).
authRewriteReq :: AuthRouter r a -> (ByteString -> ByteString -> Controller r Bool) -> Controller r a -> Controller r a


-- | <i>Simple</i> is based on WAI - an standard interface for
--   communicating between web servers (like warp) and web applications.
--   You can use <i>Simple</i> completely independently (and of course, use
--   any WAI server to run it). Alternatively, you can embed existing
--   existing WAI applications inside an app built with <i>Simple</i>, and
--   embed an app built with simple in another WAI app.
--   
--   All the components in <i>Simple</i> are designed to be small and
--   simple enough to understand, replaceable, and work as well
--   independantly as they do together.
module Web.Simple


-- | REST is a DSL for creating routes using RESTful HTTP verbs. See
--   <a>http://en.wikipedia.org/wiki/Representational_state_transfer</a>
module Web.REST

-- | Type used to encode a REST controller.
data REST m s
REST :: ControllerT s m () -> ControllerT s m () -> ControllerT s m () -> ControllerT s m () -> ControllerT s m () -> ControllerT s m () -> ControllerT s m () -> REST m s
[restIndex] :: REST m s -> ControllerT s m ()
[restShow] :: REST m s -> ControllerT s m ()
[restCreate] :: REST m s -> ControllerT s m ()
[restUpdate] :: REST m s -> ControllerT s m ()
[restDelete] :: REST m s -> ControllerT s m ()
[restEdit] :: REST m s -> ControllerT s m ()
[restNew] :: REST m s -> ControllerT s m ()
type RESTController m r = RESTControllerM m r ()
rest :: Monad m => RESTControllerM m r a -> REST m r
routeREST :: Monad m => REST m s -> ControllerT s m ()

-- | GET /
index :: ControllerT s m () -> RESTController m s

-- | GET /:id
show :: ControllerT s m () -> RESTController m s

-- | POST /
create :: ControllerT s m () -> RESTController m s

-- | PUT /:id
update :: ControllerT s m () -> RESTController m s

-- | DELETE /:id
delete :: ControllerT s m () -> RESTController m s

-- | GET /:id/edit
edit :: ControllerT s m () -> RESTController m s

-- | GET /new
new :: ControllerT s m () -> RESTController m s


-- | Frank is a Sinatra-inspired DSL (see <a>http://www.sinatrarb.com</a>)
--   for creating routes. It is composable with all <tt>ToApplication</tt>
--   types, but is designed to be used with <a>Controller</a>s. Each verb
--   (<a>get</a>, <a>post</a>, <a>put</a>, etc') takes a URL pattern of the
--   form "/dir/:paramname/dir" (see <a>routePattern</a> for details) and a
--   <tt>ToApplication</tt>:
--   
--   <pre>
--   main :: IO ()
--   main = run 3000 $ controllerApp () $ do
--     get "/" $ do
--       req &lt;- request
--       respond $ okHtml $ fromString $
--         "Welcome Home " ++ (show $ serverName req)
--     get "/user/:id" $ do
--       userId &lt;- queryParam "id" &gt;&gt;= fromMaybe ""
--       respond $ ok "text/json" $ fromString $
--         "{\"myid\": " ++ (show userId) ++ "}"
--     put "/user/:id" $ do
--       ...
--   </pre>
module Web.Frank

-- | Matches the GET method on the given URL pattern
get :: Monad m => Text -> ControllerT s m a -> ControllerT s m ()

-- | Matches the POST method on the given URL pattern
post :: Monad m => Text -> ControllerT s m a -> ControllerT s m ()

-- | Matches the PUT method on the given URL pattern
put :: Monad m => Text -> ControllerT s m a -> ControllerT s m ()

-- | Matches the PATCH method on the given URL pattern
patch :: Monad m => Text -> ControllerT s m a -> ControllerT s m ()

-- | Matches the DELETE method on the given URL pattern
delete :: Monad m => Text -> ControllerT s m a -> ControllerT s m ()

-- | Matches the OPTIONS method on the given URL pattern
options :: Monad m => Text -> ControllerT s m a -> ControllerT s m ()
