Safe Haskell | None |
---|---|
Language | Haskell2010 |
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"]
Instances
TMap (q :: k -> Constraint) ('[] :: [k]) Source # | |
Defined in Servant.OpenApi.Internal.TypeLevel.TMap | |
(q x, TMap q xs) => TMap (q :: a -> Constraint) (x ': xs :: [a]) Source # | |
Defined in Servant.OpenApi.Internal.TypeLevel.TMap |