HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulegeneric-lens-core-2.3.0.0Haskell2010

Data.Generics.Product.Internal.Positions

Derive positional product type getters and setters generically.

Synopsis
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