focus

A general abstraction for manipulating elements of container data structures

https://github.com/nikita-volkov/focus

Version on this page:0.1.5.2
LTS Haskell 22.40:1.0.3.2
Stackage Nightly 2024-11-04:1.0.3.2
Latest on Hackage:1.0.3.2

See all snapshots focus appears in

MIT licensed and maintained by Nikita Volkov
This version can be pinned in stack with:focus-0.1.5.2@sha256:fc5c76a5be3a9a1c456106d6f389939299c7e05a1a24938b909f043e36a3e37b,1519

Module documentation for 0.1.5.2

Depends on 1 package(full list with versions):
Used by 3 packages in lts-9.21(full list with versions):

An API for construction of free-form strategies of access and manipulation of elements of arbitrary data structures. It allows to implement efficient composite patterns, e.g., a simultaneous update and lookup of an element, and even more complex things.

Strategies are meant to be interpreted by the host data structure libraries. Thus they allow to implement all access and modification patterns of a data structure with just a single function, which interprets strategies.

This library provides pure and monadic interfaces, so it supports both immutable and mutable data structures.