Type.Trout
- Package
- purescript-trout
- Repository
- owickstrom/purescript-trout
#CaptureAll Source
data CaptureAll (v :: Symbol) t
Captures all remaining segments of a path, all as type t
. The v
is a Symbol
that describes the captured value.
#Resource Source
data Resource ms
A type-level description of an HTTP resource, terminating a chain of
path literals, captures, and other endpoint type constructs. The ms
are
the methods handled by this resource.
#Sub Source
data Sub e t
The Sub
is used to create the chain of Lit
, Capture
, Resource
,
and other such type constructs that build up an endpoint type. Sub
is more often used infix with the :>
operator.
#Alt Source
data Alt a b
Alt
represents choice, i.e. that endpoint a
is tried first, and if
it fails, b
is tried next. Alt
is written infix using :<|>
and is
used to compose multiple endpoint types into a larger API or site. Using
the infix operator, Alt a (Alt b c)
can be written a :<|> b :<|> c
.
#QueryParam Source
data QueryParam (k :: Symbol) t
Captures the first value of the query string parameter, or Nothing
. t
is the type of the value. k
is the name of the key as a Symbol
.
#QueryParams Source
data QueryParams (k :: Symbol) t
Captures all values of the query string parameter, or []
. t
is the
type of the value. k
is the name of the key as a Symbol
.