servant-named-0.1.0.0: Add named endpoints to servant

Safe HaskellNone
LanguageHaskell2010

Servant.API.Named

Synopsis

Documentation

data Named s Source #

Symbol singleton

Constructors

KnownSymbol s => Named 

Instances

Show (Named s) Source # 

Methods

showsPrec :: Int -> Named s -> ShowS #

show :: Named s -> String #

showList :: [Named s] -> ShowS #

data NameList :: [(Symbol, Type)] -> Type where Source #

Hetereogenous list with name tag

Constructors

Nil :: NameList '[] 
(::<|>) :: (name ::= a) -> NameList xs -> NameList ('(name, a) ': xs) infixr 7 

Instances

ShowList (NameList a) => Show (NameList a) Source # 

Methods

showsPrec :: Int -> NameList a -> ShowS #

show :: NameList a -> String #

showList :: [NameList a] -> ShowS #

data name ::= a Source #

Constructors

(Named name) := a 

type Nil = '[] Source #

type family n := a where ... infix 8 Source #

Notational convenience to make value and type level defns match up

Equations

(Named n) := a = '(n, a) 

type family x ::<|> y where ... infixr 7 Source #

Notational convenience to make value and type level defns match up

Equations

x ::<|> y = x ': y 

type family FromNamed xs where ... Source #

Equations

FromNamed xs = FromNamedSorted (Sort xs)