EDIT: v0.1.3 is in OPAM, which should fix the bad outer module naming described previously.
My first OPAM package,
travesty, is now in the repository
What is it?
Travesty is (yet another ) implementation of monadic traversals (similar to Haskell’s
Traversable typeclass), state monads and transformers, and several other container and monad extensions. Though it’s nowhere near as comprehensive as, say, BAP’s monads library, it sits on top of
Container infrastructure and tries to use similar conventions where possible.
Travesty specifically includes:
Mappablesignature set that captures
mapping over arity-0 and arity-1 types (what Haskell would call a functor);
Traversablesignature set that describes
map_m, a generalisation of
mapto Core-style monads similar to Haskell’s traverse;
- an implementation of state transformers over Core monads, and standalone state monads;
- some functors for deriving Core-style
Containers from types with monadic traversals (since
map_mover a state monad can derive
- various helper functions for building
map_mover Fieldslib and Variantslib derived operations;
Singletoncontainer, which lifts a single value into a traversable container;
- miscellaneous extensions for Core containers, and specific extensions for
Travesty is MIT licenced.
Caveat emptor: Travesty is still in pre-release (
v0.1.2 at time of writing). This is because I very much expect to make breaking changes to the API. Now that it’s on
OPAM, I’ll try to keep any pre-
v1 breaking changes to minor version increments, but nonetheless here be dragons.
Why does this exist?
Travesty is a spin-off from some other work I’ve been doing, where the same monadic concepts kept recurring over and over again, and eventually accumulated in a
utils module. I figured that it might be useful for other
Core-style projects, so I spun it out.
(To be honest, I didn’t notice BAP’s monads library until after I’d done so , though I feel like Travesty has a niche for being a more ‘
Is there documentation?
Autogenerated API documentation is here — for now, I’ve tried to make it comprehensive in terms of describing signatures, but it’s missing examples and usage information. I’m also new to
odoc, so I’m learning how to document as I go along
What about contributions?
I’m very much open to contributions, be they extensions, documentation improvements, cleanups, and so on—either through issues or direct pull requests. I’m fairly new to all of this (having come from a more Haskell-y world,
travesty is mostly the end result of trying to program OCaml like Haskell!), so I greatly appreciate any engagement available.