hercules-ci-api-core-0.1.2.0: Types and convenience modules use across Hercules CI API packages
Safe HaskellNone
LanguageHaskell2010

Hercules.API.Servant

Description

Extras for working with servant

Synopsis

Documentation

useApi :: (GenericServant f mode, GenericServant g mode) => (f mode -> ToServant g mode) -> f mode -> g mode Source #

Postcomposes fromServant to an accessor, preserving the mode parameter, because otherwise the mode parameter can not be inferred.

Ideally, this functionality would be built into a new combinator.

noContent :: Functor m => m NoContent -> m () Source #

void specialised to NoContent to soothe the compiler that rightfully warns about throwing away a do notation result. By specialising, we make sure that we still get warnings if the result type changes in the future. (We'll get an error)