servant-openapi3-2.0.0.1: Generate a Swagger/OpenAPI/OAS 3.0 specification for your servant API.

Safe HaskellNone
LanguageHaskell2010

Servant.OpenApi.Internal.TypeLevel.TMap

Synopsis
  • class TMap (q :: k -> Constraint) (xs :: [k]) where
    • tmap :: p q -> (forall x p'. q x => p' x -> a) -> p'' xs -> [a]

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"]

Methods

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

Instances
TMap (q :: k -> Constraint) ([] :: [k]) Source # 
Instance details

Defined in Servant.OpenApi.Internal.TypeLevel.TMap

Methods

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

(q x, TMap q xs) => TMap (q :: a -> Constraint) (x ': xs :: [a]) Source # 
Instance details

Defined in Servant.OpenApi.Internal.TypeLevel.TMap

Methods

tmap :: p q -> (forall (x0 :: k) (p' :: k -> Type). q x0 => p' x0 -> a0) -> p'' (x ': xs) -> [a0] Source #