package travesty
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=40ada5c475cfeba7d933eec133294d1b5ef5da6ce864c9746b2ce4ce49b5e3a4
md5=dc818d6b232f13edb388d25781cd99a2
CHANGES.md.html
v0.3.0 (2019-03-03)
Breaking changes
Now targeting v0.12 of Jane Street's upstream libraries. This release of travesty no longer supports v0.11.
As a result, travesty no longer supports OCaml 4.06; please use 4.07+.
Traversable signature names have changed:
Basic_container0
is nowBasic0
, andBasic_container1
is nowBasic1
. The original names are now used for stronger interfaces that include implementations ofContainer.S*
; see 'new features' below for information.
New features
Add
T_container.Extensions0
andExtend0
, which generalise most ofExtensions1
/Extend1
to arity-0 containers.Generalise
T_container
's predicate extensions (any
/all
/none
) over arity-0 containers, provided that theirelt
isx -> bool
for somex
.Add
Bi_mappable
, an implementation of bifunctors.Add
T_alist
, an extended form ofList.Assoc
.Split the Traversable container functors into two kinds: the
Make_container*
functors now takeBasic*
signatures (but are otherwise the same---they still produce their ownContainer.S*
instances); the newExtend_container*
functors take the now-strongerBasic_container*
signatures, which include custom implementations ofContainer.S*
, and use those instead. The idea is thatMake
is for building new containers from traversals, andExtend
is for adding traversals to existing containers.
Other
T_list
andT_option
now useExtend_container1
internally: the upshot of this is that they re-use the existing Core implementations of container operations where possible, rather than (slowly) re-building them usingfold_m
.
v0.2.0 (2018-12-23)
Breaking changes
Potentially breaking change:
Traversable.S0_container
now containsmodule Elt : Equal.S
, and constrainstype elt
to be equal toElt.t
. This reflects the situation inBasic_container0
, and shouldn't break any code usingMake_container0
, but may cause custom-built modules to fail to type-check.T_container.any
's arguments have swapped order, to be more in line withCore
idioms.
New features
Add
Traversable.Chain0
, a functor for combining twoS0_container
instances together for nested traversal.Add
T_fn.disj
to go withT_fn.conj
.Add
Filter_mappable
, which generalisesList.filter_map
.Add
tee_m
to monad extensions. This is a small wrapper overf x >>| fun () -> x
that allows unit-returning monadic side-effects to be treated as part of a monad pipeline.Add
T_or_error
: monad extensions forCore.Or_error
.one
andtwo
are now implemented onT_container
, not justT_list
. The errors are slightly less precise, but otherwise nothing has changed.Add
T_container.at_most_one
to complementone
andtwo
.Add
Monad.To_mappable
, which makes sure that monads can be converted to mappables.Add
T_container.all
andnone
, to complementany
.
Other
Improve API documentation.
v0.1.3 (2018-12-13)
Fix incorrect module name (was
Lib
, notTravesty
).Restrict to OCaml v4.06+ (this was the case in the final v0.1.2 OPAM release, but not upstream).
v0.1.2 (2018-12-12)
Improve API documentation.
Move functors and concrete modules out of
Intf
files.Generally rationalise the interface ready for a public release.
Add various container modules from
act
:Singleton
,T_list
, andT_option
.
v0.1.1 (2018-12-10)
Move API documentation, in an attempt to get
dune-release
to work.
v0.1 (2018-12-10)
Initial release.
Existing functionality migrated from
act
's utils directory.