| Copyright | Dennis Gosnell 2017 |
|---|---|
| License | BSD3 |
| Maintainer | Dennis Gosnell (cdep.illabout@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
Servant.RawM.Internal.API
Description
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'
FileServerHasDocs 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 | |
| HasLink (RawM' st :: Type) Source # | |
| 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 MkLink (RawM' st :: Type) a Source # | |
Defined in Servant.RawM.Internal.API | |
| 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 Methods docsFor :: Proxy FileServer -> (Endpoint, Action) -> DocOptions -> API # | |