v2.0.0-rc1
Pre-release
Pre-release
robotlolita
released this
25 Jun 16:42
·
143 commits
to master
since this release
New features
Maybe
now implements Semigroup and Monoid (PR #125 by @diasbruno).Result
now implements Semigroup.
BREAKING CHANGES
-
folktale/data/future
is nowfolktale/concurrency/future
. -
folktale/data/task
is nowfolktale/concurrency/task
. -
folktale/data/conversions
is nowfolktale/conversions
. -
folktale/core/fantasy-land
is nowfolktale/fantasy-land
. -
folktale/data/maybe
is nowfolktale/maybe
. -
folktale/data/result
is nowfolktale/result
. -
folktale/data/validation
is nowfolktale/validation
. -
The
folktale/core/adt
module is nowfolktale/adt/union
module, which specifies that it creates union types. Thedata
function was also renamed tounion
, and theADT
namespace was renamed toUnion
— although this one was used mostly internally.Previously:
const { data, derivations } = require('folktale/core/adt'); const List = data('List', { Empty(){ }, Cons(value, rest) { return { value, rest }; } }).derive(derivations.Equality);
Now:
const { union, derivations } = require('folktale/adt/union'); const List = union('List', { Empty(){ }, Cons(value, rest) { return { value, rest }; } }).derive(derivations.Equality);