HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduleoptics-core-0.4.2Haskell2010

Optics.Internal.Generic.TypeLevel

This module is intended for internal use only, and may change without warning in subsequent releases.

  • 2 types
  • Packageoptics-core-0.4.2
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTypeLevel.hs

Pathing

2 declarations
datadata PathTree e
#

A map that allows reaching a specific field in a generic representation of a data type. Computed up front by generic optics for early error reporting and efficient data traversal.

Constructors

datadata Path
#
Instances17GAffineFieldMaybe, GSetFieldProd, GConstructorSum, GFieldProd, …

Names

familytype family GetNamePath (name :: Symbol) (g :: k -> Type) (acc :: [Path]) :: Either Symbol [Path] where
#

Compute path to a constructor in a sum or a field in a product with a specific name.

Equations

Positions

familytype family GetPositionPaths (s :: t) (pos :: Nat) (g :: k -> Type) :: PathTree (Nat, Nat) where
#

Compute paths to a field at a specific position.

Equations

familytype family GetPositionPath (pos :: Nat) (g :: k -> Type) (k1 :: Nat) (acc :: [Path]) :: Either (Nat, Nat) [Path] where
#

Compute path to a constructor in a sum or a field in a product at a specific position.

Equations

Misc

3 declarations
familytype family HideReps (g :: Type -> Type) (h :: Type -> Type) :: Constraint where
#

Generate bogus equality constraints that attempt to unify generic representations with this type in case there is an error such as missing field, constructor etc. so these huge types don't leak into error messages.

Equations