Servant.Swagger.Internal.TypeLevel.TMap

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

Safe Haskell | None
Language | Haskell2010

Servant.Swagger.Internal.TypeLevel.TMap

Synopsis

- class TMap q xs where

# Documentation

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

class TMap q xs where #

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

Instances

TMap k q ([] k) # |
Methods tmap :: p [k] -> (forall x p'. [k] x => p' x -> a) -> p'' xs -> [a] #
(q x, TMap a q xs) => TMap a q ((:) a x xs) # |
Methods tmap :: p ((a ': x) xs) -> (forall b p'. (a ': x) xs b => p' b -> a) -> p'' xs -> [a] #