HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleone-liner-2.1Haskell2010

Generics.OneLiner.Internal.Unary

  • 11 types
  • 2 classes
  • 11 values
  • Packageone-liner-2.1
  • Exports24
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceUnary.hs
typetype J (f :: k1 -> k1 -> k) (a :: k1) = f a a
#

Type-level join, of kind (k -> k -> k') -> k -> k'.

classclass (c a, a ~ b) => D (c :: k -> Constraint) (a :: k) (b :: k)
#

Constraint-level duplicate, of kind (k -> Constraint) -> k -> k -> Constraint.

Instances1D
  • (c a, a ~ b) => D c a bDefined in one-liner-2.1 · Generics.OneLiner.Internal.Unary
valuectorIndex :: ADT t => t -> Int
#

Get the index in the lists returned by create and createA of the constructor of the given value.

For example, this is the implementation of put that generates the binary data that the above implentation of get expects:

put t = putWord8 (toEnum (ctorIndex t)) <> gfoldMap @Binary put t
classclass AnyType (a :: k)
#

Any type is instance of AnyType, you can use it with @AnyType if you don't actually need a class constraint.

Instances1AnyType
  • AnyType aDefined in one-liner-2.1 · Generics.OneLiner.Internal.Unary