added documentation
This commit is contained in:
parent
f37e39bb4d
commit
e255b1fa5a
3 changed files with 38 additions and 14 deletions
|
@ -1,8 +1,14 @@
|
|||
module Servant
|
||||
( module Servant.API
|
||||
, module Servant.Client
|
||||
, module Servant.Server
|
||||
, module Servant.Text
|
||||
module Servant (
|
||||
-- | This module and its submodules can be used to define servant APIs. Note
|
||||
-- that these API definitions don't directly implement a server (or anything
|
||||
-- else).
|
||||
module Servant.API,
|
||||
-- | For implementing servers for servant APIs.
|
||||
module Servant.Server,
|
||||
-- | For accessing servant APIs as API clients.
|
||||
module Servant.Client,
|
||||
-- | Helper module
|
||||
module Servant.Text,
|
||||
) where
|
||||
|
||||
import Servant.API
|
||||
|
|
|
@ -1,11 +1,24 @@
|
|||
module Servant.API
|
||||
( module Servant.API.Capture
|
||||
, module Servant.API.Get
|
||||
, module Servant.API.GetParam
|
||||
, module Servant.API.Post
|
||||
, module Servant.API.RQBody
|
||||
, module Servant.API.Sub
|
||||
, module Servant.API.Union
|
||||
module Servant.API (
|
||||
|
||||
-- * Combinators
|
||||
-- | Type-level combinator for expressing routing, captures, get parameters, etc.
|
||||
module Servant.API.Sub,
|
||||
-- | Type-level combinator for alternative endpoints
|
||||
module Servant.API.Union,
|
||||
|
||||
-- * Accessing information from the request
|
||||
-- | Capturing parts of the url path as parsed values
|
||||
module Servant.API.Capture,
|
||||
-- | Retrieving parameters from the query part of the 'URI'
|
||||
module Servant.API.GetParam,
|
||||
-- | Accessing the request's body
|
||||
module Servant.API.RQBody,
|
||||
|
||||
-- * Actual endpoints, distinguished by HTTP method
|
||||
-- | GET requests
|
||||
module Servant.API.Get,
|
||||
-- | POST requests
|
||||
module Servant.API.Post,
|
||||
) where
|
||||
|
||||
import Servant.API.Capture
|
||||
|
@ -14,4 +27,4 @@ import Servant.API.GetParam
|
|||
import Servant.API.Post
|
||||
import Servant.API.RQBody
|
||||
import Servant.API.Sub
|
||||
import Servant.API.Union
|
||||
import Servant.API.Union
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
-- | This module lets you implement 'Server's for defined APIs. You will
|
||||
-- probably need 'serve' (and look at the 'HasServer' type family), but
|
||||
-- 'toApplication' and 'route' are rather internals.
|
||||
|
||||
module Servant.Server where
|
||||
|
||||
import Data.Proxy
|
||||
|
|
Loading…
Reference in a new issue