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

Modulesop-core-0.5.0.2Haskell2010

Data.SOP.BasicFunctors

Basic functors.

Definitions of the type-level equivalents of const, id, and (.), and a definition of the lifted function space.

These datatypes are generally useful, but in this library, they're primarily used as parameters for the NP, NS, POP, and SOP types.

We define own variants of Const, Identity and Compose for various reasons.

  • 3 types
  • 15 values
  • Packagesop-core-0.5.0.2
  • Exports18
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceBasicFunctors.hs

Basic functors

6 declarations
newtypenewtype K a (b :: k)
#

The constant type functor.

Like Constant, but kind-polymorphic in its second argument and with a shorter name.

Constructors

Instances23Eq2, Ord2, Read2, Show2, NFData2, Functor, …
  • Eq2 KDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Ord2 KDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Read2 KDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Show2 KDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • NFData2 KDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Functor (K a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Monoid a => Applicative (K a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Foldable (K a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Traversable (K a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Eq a => Eq1 (K a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Ord a => Ord1 (K a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Read a => Read1 (K a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Show a => Show1 (K a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • NFData a => NFData1 (K a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Eq a => Eq (K a b)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Ord a => Ord (K a b)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Read a => Read (K a b)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Show a => Show (K a b)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Generic (K a b)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Semigroup a => Semigroup (K a b)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Monoid a => Monoid (K a b)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • NFData a => NFData (K a b)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • type Rep (K a b) = D1 ('MetaData "K" "Data.SOP.BasicFunctors" "sop-core-0.5.0.2-H2UXoHYAvEiC36SsvaWSBU" 'True) (C1 ('MetaCons "K" 'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
valueunK :: K a b -> a
#

Extract the contents of a K value.

newtypenewtype I a
#

The identity type functor.

Like Identity, but with a shorter name.

Constructors

Instances19Monad, Functor, Applicative, Foldable, Traversable, Eq1, …
  • Monad IDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Functor IDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Applicative IDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Foldable IDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Traversable IDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Eq1 IDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Ord1 IDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Read1 IDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Show1 IDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • NFData1 IDefined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Eq a => Eq (I a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Ord a => Ord (I a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Read a => Read (I a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Show a => Show (I a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Generic (I a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Semigroup a => Semigroup (I a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • Monoid a => Monoid (I a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • NFData a => NFData (I a)Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
  • type Rep (I a) = D1 ('MetaData "I" "Data.SOP.BasicFunctors" "sop-core-0.5.0.2-H2UXoHYAvEiC36SsvaWSBU" 'True) (C1 ('MetaCons "I" 'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))Defined in sop-core-0.5.0.2 · Data.SOP.BasicFunctors
valueunI :: I a -> a
#

Extract the contents of an I value.

newtypenewtype (:.:) (f :: l -> Type) (g :: k -> l) (p :: k)
#

Composition of functors.

Like Compose, but kind-polymorphic and with a shorter name.

Constructors

Instances18Functor, Applicative, Foldable, Traversable, Eq1, Ord1, …
valueunComp :: (:.:) f g p -> f (g p)
#

Extract the contents of a Comp value.

Mapping functions

12 declarations
valuemapII :: (a -> b) -> I a -> I b
#

Lift the given function.

valuemapIK :: (a -> b) -> I a -> K b c
#

Lift the given function.

valuemapKI :: (a -> b) -> K a c -> I b
#

Lift the given function.

valuemapKK :: (a -> b) -> K a c -> K b d
#

Lift the given function.

valuemapIII :: (a -> b -> c) -> I a -> I b -> I c
#

Lift the given function.

valuemapIIK :: (a -> b -> c) -> I a -> I b -> K c d
#

Lift the given function.

valuemapIKI :: (a -> b -> c) -> I a -> K b d -> I c
#

Lift the given function.

valuemapIKK :: (a -> b -> c) -> I a -> K b d -> K c e
#

Lift the given function.

valuemapKII :: (a -> b -> c) -> K a d -> I b -> I c
#

Lift the given function.

valuemapKIK :: (a -> b -> c) -> K a d -> I b -> K c e
#

Lift the given function.

valuemapKKI :: (a -> b -> c) -> K a d -> K b e -> I c
#

Lift the given function.

valuemapKKK :: (a -> b -> c) -> K a d -> K b e -> K c f
#

Lift the given function.