Folktale v2.1.0 is a very modest release, mostly with documentation fixes.
You can look at the full changelog for details.
Making things more consistent
There were two inconsistent functions in Folktale 2:
.orElsein every other data structure. A new
.orElsemethod was added to
Future, and consequently
.recoverhas been deprecated.
Result.fromNullableonly received a nullable as a parameter, but the
Validationequivalent let people define the value to use in case of null or undefined. These functions now optionally take a fallback value.
The number of arguments provided to the function defines which behaviour will be used. This should be backwards compatible, unless you’ve been passing more than one argument to that function (which can happen in, for example,
Addressing some of the problems with
The ADT module is still pretty experimental, and so are derivations. The derived
method turned out to be more trouble, however:
If you tried serialising an object that contained objects without a
.toStringmethod, things would fail. This release fixes this problem.
If you try serialising an object that contains circular objects,
.toStringwill recurse forever. This is still an open issue. You can work around it by giving the circular object a custom
The big issue with
you don’t want that. So, yeah, this will hopefully be addressed soon.
As always, a huge thank you to everyone who contributed to improving Folktale, by reporting errors, sending feedback, talking about it, sending patches, etc.