servant-checked-exceptions-0.3.0.1: 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.Server

Contents

Description

This module exports HasServer instances for Throws and Throwing.

Synopsis

Documentation

Orphan instances

HasServer * (ThrowingNonterminal ((:>) * * (Throwing es) ((:>) k k1 api apis))) context => HasServer * ((:>) * * (Throwing es) ((:>) k k1 api apis)) context 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 ServerT ((:>) * * (Throwing es) ((:>) k k1 api apis)) (context :: (:>) * * (Throwing es) ((:>) k k1 api apis)) (m :: * -> *) :: * #

Methods

route :: Proxy ((* :> *) (Throwing es) ((k :> k1) api apis)) context -> Context context -> Delayed env (Server ((* :> *) (Throwing es) ((k :> k1) api apis)) context) -> Router env #

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

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

Associated Types

type ServerT ((:>) * * (Throwing es) ((:<|>) api1 api2)) (context :: (:>) * * (Throwing es) ((:<|>) api1 api2)) (m :: * -> *) :: * #

Methods

route :: Proxy ((* :> *) (Throwing es) (api1 :<|> api2)) context -> Context context -> Delayed env (Server ((* :> *) (Throwing es) (api1 :<|> api2)) context) -> Router env #

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

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

Associated Types

type ServerT ((:>) * * (Throwing es) (Verb * k1 method status ctypes a)) (context :: (:>) * * (Throwing es) (Verb * k1 method status ctypes a)) (m :: * -> *) :: * #

Methods

route :: Proxy ((* :> *) (Throwing es) (Verb * k1 method status ctypes a)) context -> Context context -> Delayed env (Server ((* :> *) (Throwing es) (Verb * k1 method status ctypes a)) context) -> Router env #

HasServer * ((:>) k * (Throwing ((:) * e ([] *))) api) context => HasServer * ((:>) k * (Throws e) api) context Source #

Change a Throws into Throwing.

Associated Types

type ServerT ((:>) k * (Throws e) api) (context :: (:>) k * (Throws e) api) (m :: * -> *) :: * #

Methods

route :: Proxy ((k :> *) (Throws e) api) context -> Context context -> Delayed env (Server ((k :> *) (Throws e) api) context) -> Router env #