Module

Data.Lens.Barlow.Indexed

Package
purescript-barlow-lens
Repository
sigma-andex/purescript-barlow-lens

Construction of indexed barlow optics, i.e. paths containing at least one #.

A path is split at its first #. The part before it is an ordinary barlow optic, the # itself becomes an indexed traversal, and the remainder is built at the profunctor Indexed p i, so the index is carried all the way to the focus. Each further # adds its index to the right: Tuple (Tuple i j) k.

#ConstructIndexed Source

class ConstructIndexed :: TList -> (Type -> Type -> Type) -> Type -> Type -> Type -> Type -> Type -> Constraintclass ConstructIndexed (lenses :: TList) p i s t a b | lenses s -> t a b i where

Builds an indexed optic from a lens list.

Members

Instances

#ConstructIndexedSplit Source

class ConstructIndexedSplit :: Split -> (Type -> Type -> Type) -> Type -> Type -> Type -> Type -> Type -> Constraintclass ConstructIndexedSplit (split :: Split) p i s t a b | split s -> t a b i where

Members

Instances

#ConstructIndexedRest Source

class ConstructIndexedRest :: TList -> (Type -> Type -> Type) -> Type -> Type -> Type -> Type -> Type -> Type -> Constraintclass ConstructIndexedRest (lenses :: TList) p j s t a b i | lenses j s -> t a b i where

Builds the part of the path after a #, where the current index is j.

Members

Instances

#ConstructIndexedRestSplit Source

class ConstructIndexedRestSplit :: Split -> (Type -> Type -> Type) -> Type -> Type -> Type -> Type -> Type -> Type -> Constraintclass ConstructIndexedRestSplit (split :: Split) p j s t a b i | split j s -> t a b i where

Members

Instances

#IndexedStep Source

class IndexedStep s t a b i | s -> t a b i where

The optic introduced by #: an indexed traversal over a TraversableWithIndex, or over all fields of a homogeneous record (indexed by field name).

Members

Instances

#SplitHash Source

class SplitHash :: TList -> Split -> Constraintclass SplitHash (lenses :: TList) (out :: Split) | lenses -> out

Splits a lens list at its first #.

Instances

#ConsSplit Source

class ConsSplit :: forall k. k -> Split -> Split -> Constraintclass ConsSplit h (split :: Split) (out :: Split) | h split -> out

Instances