HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleservant-openapi3-2.0.1.6Haskell2010

Servant.OpenApi.Internal.TypeLevel.API

  • 2 types
familytype family Elem (x :: a) (xs :: [a]) :: Bool where
#

Check whether a type is a member of a list of types. This is a type-level analogue of elem.

Equations

familytype family Nub (xs :: [a]) :: [a] where
#

Remove duplicates from a type-level list.

Equations

familytype family Remove (x :: a) (xs :: [a]) :: [a] where
#

Remove element from a type-level list.

Equations

typetype BodyTypes c api = Nub (BodyTypes' c api)
#

Extract a list of unique "body" types for a specific content-type from a servant API.

typetype AddBodyType (c :: a1) (cs :: [a1]) (a2 :: a) (as :: [a]) = If (Elem c cs) (a2 ': as) as
#

AddBodyType c cs a as adds type a to the list as only if c is in cs.

familytype family BodyTypes' c api :: [Type] where
#

Extract a list of "body" types for a specific content-type from a servant API. To extract unique types see BodyTypes.

NoContent is removed from the list and not tested. (This allows for leaving the body completely empty on responses to requests that only accept 'application/json', while setting the content-type in the response accordingly.)

Equations