servant-checked-exceptions-1.0.0.0: Checked exceptions for Servant APIs.

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

Servant.Checked.Exceptions.Internal.Servant.Client

Contents

Description

This module only exports HasClient instances for Throws and Throwing.

Synopsis

Documentation

Orphan instances

HasClient * (ThrowingNonterminal ((:>) * * (Throwing es) ((:>) k k1 api apis))) => HasClient * ((:>) * * (Throwing es) ((:>) k k1 api apis)) Source #

When a Throws e comes immediately after a Throwing es, Snoc the e onto the es. Otherwise, if Throws e comes before any other combinator, push it down so it is closer to the Verb.

Associated Types

type Client ((* :> *) (Throwing es) ((k :> k1) api apis)) (api :: (* :> *) (Throwing es) ((k :> k1) api apis)) :: * #

Methods

clientWithRoute :: Proxy ((* :> *) (Throwing es) ((k :> k1) api apis)) api -> Req -> Client ((* :> *) (Throwing es) ((k :> k1) api apis)) api #

HasClient * ((:<|>) ((:>) * * (Throwing es) api1) ((:>) * * (Throwing es) api2)) => HasClient * ((:>) * * (Throwing es) ((:<|>) api1 api2)) Source #

When Throwing es comes before :<|>, push Throwing es into each branch of the API.

Associated Types

type Client ((* :> *) (Throwing es) (api1 :<|> api2)) (api :: (* :> *) (Throwing es) (api1 :<|> api2)) :: * #

Methods

clientWithRoute :: Proxy ((* :> *) (Throwing es) (api1 :<|> api2)) api -> Req -> Client ((* :> *) (Throwing es) (api1 :<|> api2)) api #

HasClient * (Verb k1 * method status ctypes (Envelope es a)) => HasClient * ((:>) * * (Throwing es) (Verb k1 * method status ctypes a)) Source #

When Throwing es comes before a Verb, change it into the same Verb but returning an Envelope es.

Associated Types

type Client ((* :> *) (Throwing es) (Verb k1 * method status ctypes a)) (api :: (* :> *) (Throwing es) (Verb k1 * method status ctypes a)) :: * #

Methods

clientWithRoute :: Proxy ((* :> *) (Throwing es) (Verb k1 * method status ctypes a)) api -> Req -> Client ((* :> *) (Throwing es) (Verb k1 * method status ctypes a)) api #

HasClient * (Verb k1 * method status ctypes (Envelope ([] *) a)) => HasClient * ((:>) * * NoThrow (Verb k1 * method status ctypes a)) Source #

When NoThrow comes before a Verb, change it into the same Verb but returning an Envelope '[].

Associated Types

type Client ((* :> *) NoThrow (Verb k1 * method status ctypes a)) (api :: (* :> *) NoThrow (Verb k1 * method status ctypes a)) :: * #

Methods

clientWithRoute :: Proxy ((* :> *) NoThrow (Verb k1 * method status ctypes a)) api -> Req -> Client ((* :> *) NoThrow (Verb k1 * method status ctypes a)) api #

HasClient * ((:>) k * api ((:>) * k1 NoThrow apis)) => HasClient * ((:>) * * NoThrow ((:>) k k1 api apis)) Source #

When NoThrow comes before any other combinator, push it down so it is closer to the Verb.

Associated Types

type Client ((* :> *) NoThrow ((k :> k1) api apis)) (api :: (* :> *) NoThrow ((k :> k1) api apis)) :: * #

Methods

clientWithRoute :: Proxy ((* :> *) NoThrow ((k :> k1) api apis)) api -> Req -> Client ((* :> *) NoThrow ((k :> k1) api apis)) api #

HasClient * ((:<|>) ((:>) * * NoThrow api1) ((:>) * * NoThrow api2)) => HasClient * ((:>) * * NoThrow ((:<|>) api1 api2)) Source #

When NoThrow comes before :<|>, push NoThrow into each branch of the API.

Associated Types

type Client ((* :> *) NoThrow (api1 :<|> api2)) (api :: (* :> *) NoThrow (api1 :<|> api2)) :: * #

Methods

clientWithRoute :: Proxy ((* :> *) NoThrow (api1 :<|> api2)) api -> Req -> Client ((* :> *) NoThrow (api1 :<|> api2)) api #

HasClient * ((:>) * k1 (Throwing ((:) * e ([] *))) api) => HasClient * ((:>) * k1 (Throws e) api) Source #

Change a Throws into Throwing.

Associated Types

type Client ((* :> k1) (Throws e) api) (api :: (* :> k1) (Throws e) api) :: * #

Methods

clientWithRoute :: Proxy ((* :> k1) (Throws e) api) api -> Req -> Client ((* :> k1) (Throws e) api) api #