Copyright | Dennis Gosnell 2017 |
---|---|
License | BSD3 |
Maintainer | Dennis Gosnell (cdep.illabout@gmail.com) |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- type RawM = RawM' FileServer
- data RawM' serverType
- data FileServer
Documentation
type RawM = RawM' FileServer Source #
Specialization of RawM'
to FileServer
. This can be used if you are
using serveDirectoryWebApp
,
serveDirectoryFileServer
, etc.
data RawM' serverType Source #
This is a type to use to define a Servant API. It signifies a route that
allows embedding of a WAI Application
. It is similar to
Raw
, but it has a HasServer
instance that
allows embedding of monadic effects. This should be more convenient than
Raw
.
The phantom type serverType
is used for defining the HasDocs
instance. There are instances for HasClient
and
HasServer
for RawM'
with a polymorphic phantom type, but
there is only a HasDocs
instance specified for
. This allows the end-user to easily create a
RawM'
FileServer
HasDocs
instance for a custom Application
.
Instances
RunClient m => HasClient m (RawM' serverType) Source # | Creates a client route like the following:
This allows modification of the underlying Check out the example in the source code repository that shows a more in-depth server, client, and documentation. |
Defined in Servant.RawM.Internal.Client | |
HasDocs serverType => HasDocs (RawM' serverType :: Type) Source # | This just defers to the |
Defined in Servant.RawM.Internal.Docs | |
HasServer (RawM' serverType :: Type) context Source # | Creates a server instance like the following:
|
Defined in Servant.RawM.Internal.Server | |
type Client m (RawM' serverType) Source # | |
type ServerT (RawM' serverType :: Type) m Source # | |
Defined in Servant.RawM.Internal.Server |
data FileServer Source #
Used by RawM
as a phantom type.
Instances
HasDocs FileServer Source # | This is a |
Defined in Servant.RawM.Internal.Docs docsFor :: Proxy FileServer -> (Endpoint, Action) -> DocOptions -> API # |