servant-swagger-1.1.5: Generate Swagger specification for your servant API.

Safe HaskellNone
LanguageHaskell2010

Servant.Swagger.Internal.TypeLevel.TMap

Synopsis

Documentation

>>> :set -XDataKinds
>>> :set -XFlexibleContexts
>>> :set -XGADTs
>>> :set -XRankNTypes
>>> :set -XScopedTypeVariables
>>> import GHC.TypeLits
>>> import Data.List

class TMap (q :: k -> Constraint) (xs :: [k]) where Source #

Map a list of constrained types to a list of values.

>>> tmap (Proxy :: Proxy KnownSymbol) symbolVal (Proxy :: Proxy ["hello", "world"])
["hello","world"]

Minimal complete definition

tmap

Methods

tmap :: p q -> (forall x p'. q x => p' x -> a) -> p'' xs -> [a] Source #

Instances

TMap k q ([] k) Source # 

Methods

tmap :: p [k] -> (forall (x :: q) (p' :: q -> *). [k] x => p' x -> a) -> p'' xs -> [a] Source #

(q x, TMap a q xs) => TMap a q ((:) a x xs) Source # 

Methods

tmap :: p ((a ': x) xs) -> (forall (b :: q) (p' :: q -> *). (a ': x) xs b => p' b -> a) -> p'' xs -> [a] Source #