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

Modulelens-5.3.5Haskell2010

Control.Lens.Internal.Level

This module provides implementation details of the combinators in Control.Lens.Level, which provides for the breadth-first Control.Lens.Traversal.Traversal of an arbitrary Control.Lens.Traversal.Traversal.

  • 3 types
  • 1 value
  • Packagelens-5.3.5
  • Exports4
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceLevel.hs

Levels

4 declarations
datadata Level i a
#

This data type represents a path-compressed copy of one level of a source data structure. We can safely use path-compression because we know the depth of the tree.

Path compression is performed by viewing a Level as a PATRICIA trie of the paths into the structure to leaves at a given depth, similar in many ways to a Data.IntMap.IntMap, but unlike a regular PATRICIA trie we do not need to store the mask bits merely the depth of the fork.

One invariant of this structure is that underneath a Two node you will not find any Zero nodes, so Zero can only occur at the root.

Constructors

Instances10FoldableWithIndex, FunctorWithIndex, TraversableWithIndex, Functor, Foldable, Traversable, …
newtypenewtype Flows i b a
#

This is an illegal Applicative used to replace the contents of a list of consecutive Level values representing each layer of a structure into the original shape that they were derived from.

Attempting to Flow something back into a shape other than the one it was taken from will fail.

Constructors

Instances3Functor, Applicative, Apply
  • Functor (Flows i b)Defined in lens-5.3.5 · Control.Lens.Internal.Level
  • Applicative (Flows i b)Defined in lens-5.3.5 · Control.Lens.Internal.Level

    This is an illegal Applicative.

  • Apply (Flows i b)Defined in lens-5.3.5 · Control.Lens.Internal.Level