Package0.4.2DataOpticsLenses
optics-core
Optics as an abstract interface: core definitions
- Version0.4.2
- CategoryData, Optics, Lenses
- LicenceBSD-3-Clause
- AuthorAdam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus
- Maintaineroptics@well-typed.com
- Pinned byhackage optics-core 0.4.2
- Sourcehackage.haskell.org/package/optics-core-0.4.2
Modules
- Data.Either.OpticsThis module defines Prisms for the constructors of the Either datatype.
- Data.IntMap.OpticsIntMap is an instance of At and provides
- Data.IntSet.OpticsThis module defines optics for constructing and manipulating finite IntSets.
- Data.List.OpticsAdditional optics for manipulating lists are present more generically in this
- Data.Map.OpticsThis module exists to provide documentation for lenses for working with
- Data.Maybe.OpticsThis module defines Prisms for the constructors of the Maybe datatype.
- Data.Sequence.OpticsThis module defines optics for constructing and manipulating finite Seqs.
- Data.Set.OpticsThis module defines optics for constructing and manipulating finite Sets.
- Data.Tree.OpticsThis module defines optics for manipulating Trees.
- Data.Tuple.OpticsThis module defines Lenses for the fields of tuple types. These are
- Data.Typeable.Optics
- GHC.Generics.OpticsNote: GHC.Generics exports a number of names that collide with Optics
- Numeric.Optics
- Optics.AffineFoldAn AffineFold is a Fold that contains at most one
- Optics.AffineTraversalAn AffineTraversal is a Traversal that
- Optics.Arrow
- Optics.At.CoreThis module provides optics for Map and Set-like containers, including an
- Optics.CoerceThis module defines operations to coerce the type parameters of optics to
- Optics.Cons.CoreThis module defines the Cons and Snoc classes, which provide Prisms for
- Optics.CoreSee the Optics module in the main optics package for overview
- Optics.Core.Extras
- Optics.Each.CoreThis module defines the Each class, which provides an IxTraversal that
- Optics.Empty.CoreThis module defines the AsEmpty class, which provides a Prism for a type
- Optics.FoldA Fold S A has the ability to extract some number of elements of type A
- Optics.GenericThis module provides, for data types having a Generic instance, a way to
- Optics.GetterA Getter is simply a function considered as an Optic. Given a function f :: S -> A, we can convert it into a
- Optics.Indexed.CoreThis module defines basic functionality for indexed optics. See the "Indexed
- Optics.IsoAn Isomorphism expresses the fact that two types have the
- Optics.IxAffineFoldAn IxAffineFold is an indexed version of an AffineFold.
- Optics.IxAffineTraversalAn IxAffineTraversal is an indexed version of an
- Optics.IxFoldAn IxFold is an indexed version of a Fold. See the "Indexed
- Optics.IxGetterAn IxGetter is an indexed version of a Getter. See the
- Optics.IxLensAn IxLens is an indexed version of a Lens. See the "Indexed
- Optics.IxSetterAn IxSetter is an indexed version of a Setter. See the
- Optics.IxTraversalAn IxTraversal is an indexed version of a Traversal.
- Optics.LabelOverloaded labels are a solution to Haskell's namespace problem for records.
- Optics.LensA Lens is a generalised or first-class field. If we have a value s :: S, and a l :: Lens' S A, we can get
- Optics.MappingThis module defines mapping, which turns an Optic' k NoIx s a into an
- Optics.OperatorsDefines some infix operators for optics operations. This is a deliberately
- Optics.Operators.Unsafe
- Optics.OpticThis module provides core definitions: an opaque Optic type, which is parameterised over a type representing an
- Optics.PrismA Prism generalises the notion of a constructor (just as a
- Optics.ReSome optics can be reversed with re. This is mainly useful to invert
- Optics.ReadOnlyThis module defines getting, which turns a read-write optic into its
- Optics.ReversedLensA ReversedLens is a backwards Lens, i.e. a ReversedLens s t
- Optics.ReversedPrismA ReversedPrism is a backwards Prism, i.e. a
- Optics.ReviewA Review is a backwards Getter, i.e. a
- Optics.SetterA Setter S T A B has the ability to lift a function of type
- Optics.TraversalA Traversal lifts an effectful operation on elements to act on structures
Internal modules · 17
- Optics.Internal.BiClasses for co- and contravariant bifunctors. This module is intended for internal use only, and may change without warning
- Optics.Internal.FoldInternal implementation details of folds. This module is intended for internal use only, and may change without warning
- Optics.Internal.Generic
- Optics.Internal.Generic.TypeLevelThis module is intended for internal use only, and may change without
- Optics.Internal.IndexedInternal implementation details of indexed optics. This module is intended for internal use only, and may change without warning
- Optics.Internal.Indexed.ClassesInternal implementation details of indexed optics. This module is intended for internal use only, and may change without warning
- Optics.Internal.IxFoldInternal implementation details of indexed folds. This module is intended for internal use only, and may change without warning
- Optics.Internal.IxSetterInternal implementation details of indexed setters. This module is intended for internal use only, and may change without warning
- Optics.Internal.IxTraversalInternal implementation details of indexed traversals. This module is intended for internal use only, and may change without warning
- Optics.Internal.MagicThis module is intended for internal use only, and may change without
- Optics.Internal.OpticCore optic types and subtyping machinery. This module contains the core Optic types, and the underlying
- Optics.Internal.Optic.SubtypingInstances to implement the subtyping hierarchy between optics. This module is intended for internal use only, and may change without warning
- Optics.Internal.Optic.TypeLevelThis module is intended for internal use only, and may change without
- Optics.Internal.Optic.TypesThis module is intended for internal use only, and may change without
- Optics.Internal.SetterInternal implementation details of setters. This module is intended for internal use only, and may change without warning
- Optics.Internal.TraversalInternal implementation details of traversals. This module is intended for internal use only, and may change without warning
- Optics.Internal.UtilsThis module is intended for internal use only, and may change without warning
Description
This package makes it possible to define and use Lenses, Traversals, Prisms and other optics, using an abstract interface. . This variant provides core definitions with a minimal dependency footprint. See the optics package (and its dependencies) for documentation and the "batteries-included" variant.
Depends on
6 packages- array-0.5.8.0with GHC
- base-4.23.0.0with GHC
- containers-0.8with GHC
- indexed-profunctors-0.1.1.1in this set
- indexed-traversable-0.1.5in this set
- transformers-0.6.3.0with GHC