servant-rawm-0.3.2.0: Embed a raw 'Application' in a Servant API

CopyrightDennis Gosnell 2017
LicenseBSD3
MaintainerDennis Gosnell (cdep.illabout@gmail.com)
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Servant.RawM.Internal.Client

Contents

Description

This module only exports a HasClient instance for RawM.

Orphan instances

RunClient m => HasClient m (RawM' serverType) Source #

Creates a client route like the following:

>>> :set -XTypeOperators
>>> import Data.Type.Equality ((:~:)(Refl))
>>> Refl :: Client m (RawM' a) :~: ((Request -> Request) -> m Response)
Refl

This allows modification of the underlying Request to work for any sort of Application.

Check out the example in the source code repository that shows a more in-depth server, client, and documentation.

Instance details

Associated Types

type Client m (RawM' serverType) :: Type #

Methods

clientWithRoute :: Proxy m -> Proxy (RawM' serverType) -> Request -> Client m (RawM' serverType) #

hoistClientMonad :: Proxy m -> Proxy (RawM' serverType) -> (forall x. mon x -> mon' x) -> Client mon (RawM' serverType) -> Client mon' (RawM' serverType) #