HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleservant-openapi3-2.0.1.6Haskell2010

Servant.OpenApi.Internal.TypeLevel.Every

  • 1 class
  • 1 value
Example7 expressions
:set -XDataKinds:set -XFlexibleContexts:set -XGADTs:set -XRankNTypes:set -XScopedTypeVariablesimport GHC.TypeLitsimport Data.List
familytype family EveryTF (cs :: [k -> Constraint]) (x :: k) :: Constraint where
#

Apply multiple constraint constructors to a type.

EveryTF '[Show, Read] a ~ (Show a, Read a)

Note that since this is a type family, you have to alway fully apply EveryTF.

For partial application of multiple constraint constructors see Every.

Equations

classclass EveryTF cs x => Every (cs :: [Type -> Constraint]) x
#

Apply multiple constraint constructors to a type as a class.

This is different from EveryTF in that it allows partial application.

Instances2Every
  • Every '[] xDefined in servant-openapi3-2.0.1.6 · Servant.OpenApi.Internal.TypeLevel.Every
  • (c x, Every cs x) => Every (c ': cs) xDefined in servant-openapi3-2.0.1.6 · Servant.OpenApi.Internal.TypeLevel.Every
valuetmapEvery
  1. :: TMap (Every cs) xs
  2. => p cs
  3. -> forall x (p' :: Type -> Type). Every cs x => p' x -> a
  4. -> p'' xs
  5. -> [a]
#

Like tmap, but uses Every for multiple constraints.

Example2 expressions
let zero :: forall p a. (Show a, Num a) => p a -> String; zero _ = show (0 :: a)tmapEvery (Proxy :: Proxy [Show, Num]) zero (Proxy :: Proxy [Int, Float]) :: [String]["0","0.0"]