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

Modulegeneric-lens-core-2.2.1.0Haskell2010

Data.Generics.Product.Internal.Positions

Derive positional product type getters and setters generically.

  • 4 types
  • 1 class
  • 2 values
typetype (<?) (x :: k) (y :: k) = Not (y <=? x)
#
familytype family CRep a :: G where
#

In-order labeling of the generic tree with the field positions

We replace the (K1 R a) nodes with (K1 (Pos n) a), where n is the position of the field in question in the data type. This is convenient, because we can reuse all the existing functions as long as they are polymorphic in the first parameter of K1.

Equations

  • CRep rep = Fst (Traverse (Rep rep) 1)
classclass Context (i :: Nat) (s :: k) (t :: k1) (a :: k2) (b :: k3) | s i -> a, t i -> b, s i b -> t, t i a -> s
#
Instances1Context