package travesty
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=40ada5c475cfeba7d933eec133294d1b5ef5da6ce864c9746b2ce4ce49b5e3a4
md5=dc818d6b232f13edb388d25781cd99a2
doc/index.html
Travesty
Travesty
is a library for defining containers with monadic traversals, inspired by Haskell's Traversable typeclass. It sits on top of Jane Street's Core library ecosystem.
As well as monadic traversals, Travesty
includes various other extensions on top of Core. These focus on making a more 'purely functional', Haskell-esque style of programming easier, though with a focus on pragmatism over mathematical purity.
Other similar libraries
- The BAP monads library also contains implementations of monadic traversals, as well as several of
Travesty
's other extensions.
Traversal interfaces
Travesty
's main contribution is the Traversable module, which implements monadic traversal. It also includes a Mappable module, which adds various bits of support for mappable containers (what Haskell would call 'functors').
State monads
Travesty
also contains implementations of state monads (State) and transformers (State_transform). These are mainly used to implement fold-mapping and folding on top of Traversable, but we expose them for general consumption.
Extensions
Travesty also contains extensions to various Core modules and module signatures. These generally carry a T_
prefix, so that they don't clash with Core modules if Travesty is opened globally.
Signature expansions
- Containers (T_container)
- Monads (T_monad)
Implementation expansions
- Errors (T_or_error)
- Functions (T_fn)
- Lists (T_list)
- Options (T_option)