servant-0.20.3.0: A family of combinators for defining webservices APIs

Safe Haskell | None
Language | Haskell2010

Servant.API.TypeErrors

Description

This module defines the error messages used in type-level errors. Type-level errors can signal non-existing instances, for instance when a combinator is not applied to the correct number of arguments.

Synopsis

- type PartialApplication (tycls :: k) (expr :: k') = NoInstanceForSub tycls expr ':$$: ((('ShowType expr ':<>: 'Text " expects ") ':<>: 'ShowType (Arity expr)) ':<>: 'Text " more arguments")
- type NoInstanceFor (expr :: k) = 'Text "There is no instance for " ':<>: 'ShowType expr
- type NoInstanceForSub (tycls :: k) (expr :: k') = ((('Text "There is no instance for " ':<>: 'ShowType tycls) ':<>: 'Text " (") ':<>: 'ShowType expr) ':<>: 'Text " :> ...)"
- type ErrorIfNoGeneric (routes :: Type -> Type) = Break (NoGeneric routes :: Type) (Rep (routes ()))

# Documentation

type PartialApplication (tycls :: k) (expr :: k') = NoInstanceForSub tycls expr ':$$: ((('ShowType expr ':<>: 'Text " expects ") ':<>: 'ShowType (Arity expr)) ':<>: 'Text " more arguments") Source #

No instance exists for `tycls (expr :> ...)` because `expr` is not fully saturated.

type NoInstanceFor (expr :: k) = 'Text "There is no instance for " ':<>: 'ShowType expr Source #

No instance exists for `expr`.

type NoInstanceForSub (tycls :: k) (expr :: k') = ((('Text "There is no instance for " ':<>: 'ShowType tycls) ':<>: 'Text " (") ':<>: 'ShowType expr) ':<>: 'Text " :> ...)" Source #

No instance exists for `tycls (expr :> ...)` because `expr` is not recognised.

type ErrorIfNoGeneric (routes :: Type -> Type) = Break (NoGeneric routes :: Type) (Rep (routes ())) Source #