Lenses, traversals and prisms for Haskell through an abstract interface
open sourceBSD-3-Clausefree
optics is a family of Haskell packages for defining and using lenses, traversals, prisms and other optics through an abstract interface, comparable in power to lens but exploring a different design. It's split into optics-core (core definitions with few dependencies), optics-extra, optics-th (Template Haskell), optics-sop and the batteries-included optics package. It's made by Well-Typed (Adam Gundry, Andres Löh, Andrzej Rybczak and Oleg Grenrus).
Problems it solves
- update nested records in Haskell
- an alternative lens library for Haskell
- focus on part of a data structure with optics in Haskell
Features
- lenses, traversals and prisms with an abstract interface
- optics-core with a minimal dependency footprint
- Template Haskell generation (optics-th)
- alternative design to lens
Alternatives
The same job
These do what optics does.
- lens Lenses, folds and traversals for Haskell
- microlens A lightweight lens library for Haskell, compatible with lens
- profunctors Profunctor type classes and constructions for Haskell
- adjunctions Adjunctions and representable functors for Haskell
- transformers Concrete functor and monad transformers for Haskell
- comonad Comonads for Haskell, the categorical dual of monads
