HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleservant-0.20.2Haskell2010

Servant.API.Description

  • 3 types
  • 1 value
  • Packageservant-0.20.2
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceDescription.hs

Combinators

2 declarations
datadata Description (sym :: Symbol)
#

Add more verbose description for (part of) API.

Example:

Example1 expression
:{type MyApi = Description "This comment is visible in multiple Servant interpretations \ \and can be really long if necessary. \ \Haskell multiline String support is not perfect \ \but it's still very readable.":> Get '[JSON] Book:}
Instances2HasLink, MkLink
datadata Summary (sym :: Symbol)
#

Add a short summary for (part of) API.

Example:

Example1 expression
type MyApi = Summary "Get book by ISBN." :> "books" :> Capture "isbn" Text :> Get '[JSON] Book
Instances2HasLink, MkLink

Used as modifiers

3 declarations
typetype FoldDescription (mods :: [Type]) = FoldDescription' "" mods
#

Fold list of modifiers to extract description as a type-level String.

Example1 expression
:kind! FoldDescription '[]FoldDescription '[] :: Symbol= ""
Example1 expression
:kind! FoldDescription '[Required, Description "foobar", Lenient]FoldDescription '[Required, Description "foobar", Lenient] :: Symbol= "foobar"