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

Moduleone-liner-2.1Haskell2010

Generics.OneLiner.Classes

  • 1 type
  • 9 classes
  • 4 values
  • Packageone-liner-2.1
  • Exports14
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceClasses.hs

A generic function using a GenericRecordProfunctor works on any data type with exactly one constructor, a.k.a. records, with multiple fields (mult) or no fields (unit).

GenericRecordProfunctor is similar to ProductProfuctor from the product-profunctor package, but using types from GHC.Generics.

Instances1GenericRecordProfunctor
classclass Profunctor p => GenericUnitProfunctor (p :: Type -> Type -> Type) where
#

Methods

Instances13GenericUnitProfunctor, …
classclass Profunctor p => GenericProductProfunctor (p :: Type -> Type -> Type) where
#

Methods

  • mult :: p (f a) (f' a') -> p (g a) (g' a') -> p ((:*:) f g a) ((:*:) f' g' a')
Instances13GenericProductProfunctor, …
classclass Profunctor p => GenericSumProfunctor (p :: Type -> Type -> Type) where
#

Methods

  • plus :: p (f a) (f' a') -> p (g a) (g' a') -> p ((:+:) f g a) ((:+:) f' g' a')
Instances10GenericSumProfunctor, …
classclass Profunctor p => GenericConstantProfunctor (p :: Type -> Type -> Type) where
#

Methods

Instances10GenericConstantProfunctor, …
classclass Profunctor p => GenericEmptyProfunctor (p :: Type -> Type -> Type) where
#

Methods

Instances10GenericEmptyProfunctor, …
newtypenewtype Zip (f :: Type -> Type) a b
#

Constructors

Instances6Profunctor, GenericConstantProfunctor, GenericEmptyProfunctor, GenericProductProfunctor, GenericSumProfunctor, GenericUnitProfunctor
valuee1 :: (f a %m -> b) -> (g a %m -> b) -> (:+:) f g a %m -> b
#

Orphan instances

8 instances