@fncts/base 0.0.12 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- package/_cjs/collection/Iterable/api/traverseConc.cjs +16 -21
- package/_cjs/collection/Iterable/api/traverseConc.cjs.map +1 -1
- package/_cjs/collection/compat/Array/api.cjs +10 -10
- package/_cjs/collection/compat/Array/derivations.cjs +96 -0
- package/_cjs/collection/compat/Array/derivations.cjs.map +1 -0
- package/_cjs/collection/compat/Array.cjs +13 -0
- package/_cjs/collection/compat/Array.cjs.map +1 -1
- package/_cjs/collection/compat/Record/instances.cjs +67 -16
- package/_cjs/collection/compat/Record/instances.cjs.map +1 -1
- package/_cjs/collection/compat.cjs +6 -0
- package/_cjs/collection/compat.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc/api.cjs +9 -12
- package/_cjs/collection/immutable/Conc/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/definition.cjs +41 -43
- package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/derivations.cjs +45 -0
- package/_cjs/collection/immutable/Conc/derivations.cjs.map +1 -0
- package/_cjs/collection/immutable/Conc.cjs +13 -0
- package/_cjs/collection/immutable/Conc.cjs.map +1 -1
- package/_cjs/collection/immutable/Dictionary/definition.cjs +2 -4
- package/_cjs/collection/immutable/Dictionary/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/api.cjs +26 -29
- package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/definition.cjs +15 -17
- package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/api.cjs +142 -159
- package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/constructors.cjs +2 -2
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs +18 -15
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/derivations.cjs +41 -0
- package/_cjs/collection/immutable/ImmutableArray/derivations.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs +11 -9
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray.cjs +13 -0
- package/_cjs/collection/immutable/ImmutableArray.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs +21 -22
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/constructors.cjs +2 -2
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs +3 -9
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/derivations.cjs +62 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/derivations.cjs.map +1 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs +8 -2
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray.cjs +13 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray.cjs.map +1 -1
- package/_cjs/collection/immutable/List/definition.cjs +2 -2
- package/_cjs/collection/immutable/RoseTree/definition.cjs +13 -15
- package/_cjs/collection/immutable/RoseTree/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/api.cjs +8 -12
- package/_cjs/collection/immutable/Vector/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/definition.cjs +11 -13
- package/_cjs/collection/immutable/Vector/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/internal.cjs +1 -1
- package/_cjs/collection/immutable.cjs +6 -0
- package/_cjs/collection/immutable.cjs.map +1 -0
- package/_cjs/collection/mutable/HashMap.cjs +4 -0
- package/_cjs/collection/mutable/HashMap.cjs.map +1 -1
- package/_cjs/collection/mutable.cjs +6 -0
- package/_cjs/collection/mutable.cjs.map +1 -0
- package/_cjs/collection/weak/IterableWeakMap.cjs +51 -2
- package/_cjs/collection/weak/IterableWeakMap.cjs.map +1 -1
- package/_cjs/collection/weak/IterableWeakSet.cjs +59 -7
- package/_cjs/collection/weak/IterableWeakSet.cjs.map +1 -1
- package/_cjs/collection/weak.cjs +6 -0
- package/_cjs/collection/weak.cjs.map +1 -0
- package/_cjs/collection.cjs +6 -0
- package/_cjs/collection.cjs.map +1 -0
- package/_cjs/control/Eval/api.cjs +9 -3
- package/_cjs/control/Eval/api.cjs.map +1 -1
- package/_cjs/control/Eval/definition.cjs +1 -8
- package/_cjs/control/Eval/definition.cjs.map +1 -1
- package/_cjs/control/Eval/instance.cjs +6 -0
- package/_cjs/control/Eval/instance.cjs.map +1 -1
- package/_cjs/control/Z/api.cjs +16 -14
- package/_cjs/control/Z/api.cjs.map +1 -1
- package/_cjs/control/Z/definition.cjs +8 -14
- package/_cjs/control/Z/definition.cjs.map +1 -1
- package/_cjs/control/Z/instances.cjs +6 -0
- package/_cjs/control/Z/instances.cjs.map +1 -1
- package/_cjs/control/Z/runtime.cjs +17 -13
- package/_cjs/control/Z/runtime.cjs.map +1 -1
- package/_cjs/control.cjs +6 -0
- package/_cjs/control.cjs.map +1 -0
- package/_cjs/data/Cause/api/isEmpty.cjs +2 -0
- package/_cjs/data/Cause/api/isEmpty.cjs.map +1 -1
- package/_cjs/data/Cause/api/linearize.cjs +2 -0
- package/_cjs/data/Cause/api/linearize.cjs.map +1 -1
- package/_cjs/data/Cause/api.cjs +2 -0
- package/_cjs/data/Cause/api.cjs.map +1 -1
- package/_cjs/data/Const/definition.cjs +0 -7
- package/_cjs/data/Const/definition.cjs.map +1 -1
- package/_cjs/data/Const/instances.cjs +11 -8
- package/_cjs/data/Const/instances.cjs.map +1 -1
- package/_cjs/data/Datum/api.cjs +479 -0
- package/_cjs/data/Datum/api.cjs.map +1 -0
- package/_cjs/data/Datum/definition.cjs +142 -0
- package/_cjs/data/Datum/definition.cjs.map +1 -0
- package/_cjs/data/Datum/instances.cjs +69 -0
- package/_cjs/data/Datum/instances.cjs.map +1 -0
- package/_cjs/data/DatumEither/api.cjs +365 -0
- package/_cjs/data/DatumEither/api.cjs.map +1 -0
- package/_cjs/data/DatumEither/definition.cjs +9 -0
- package/_cjs/data/DatumEither/definition.cjs.map +1 -0
- package/_cjs/data/DecodeError/definition.cjs +16 -4
- package/_cjs/data/DecodeError/definition.cjs.map +1 -1
- package/_cjs/data/DecodeError/instances.cjs +6 -0
- package/_cjs/data/DecodeError/instances.cjs.map +1 -0
- package/_cjs/data/DecodeError.cjs +13 -0
- package/_cjs/data/DecodeError.cjs.map +1 -1
- package/_cjs/data/Decoder/definition.cjs +3 -10
- package/_cjs/data/Decoder/definition.cjs.map +1 -1
- package/_cjs/data/Either/api/alignWith.cjs +2 -0
- package/_cjs/data/Either/api/alignWith.cjs.map +1 -1
- package/_cjs/data/Either/api.cjs +21 -5
- package/_cjs/data/Either/api.cjs.map +1 -1
- package/_cjs/data/Either/definition.cjs +4 -11
- package/_cjs/data/Either/definition.cjs.map +1 -1
- package/_cjs/data/Either/instances.cjs +25 -23
- package/_cjs/data/Either/instances.cjs.map +1 -1
- package/_cjs/data/EitherT/api.cjs +106 -0
- package/_cjs/data/EitherT/api.cjs.map +1 -0
- package/_cjs/data/EitherT/definition.cjs +9 -0
- package/_cjs/data/EitherT/definition.cjs.map +1 -0
- package/_cjs/data/Environment/api.cjs +15 -14
- package/_cjs/data/Environment/api.cjs.map +1 -1
- package/_cjs/data/Environment/definition.cjs.map +1 -1
- package/_cjs/data/Identity/api.cjs +3 -1
- package/_cjs/data/Identity/api.cjs.map +1 -1
- package/_cjs/data/Identity/definition.cjs +2 -4
- package/_cjs/data/Identity/definition.cjs.map +1 -1
- package/_cjs/data/Identity/instances.cjs +6 -0
- package/_cjs/data/Identity/instances.cjs.map +1 -1
- package/_cjs/data/Intervals.cjs +292 -0
- package/_cjs/data/Intervals.cjs.map +1 -0
- package/_cjs/data/Maybe/api.cjs +3 -1
- package/_cjs/data/Maybe/api.cjs.map +1 -1
- package/_cjs/data/Maybe/definition.cjs +11 -13
- package/_cjs/data/Maybe/definition.cjs.map +1 -1
- package/_cjs/data/Maybe/instances.cjs +13 -11
- package/_cjs/data/Maybe/instances.cjs.map +1 -1
- package/_cjs/data/Newtype.cjs +3 -5
- package/_cjs/data/Newtype.cjs.map +1 -1
- package/_cjs/data/Patch/api.cjs +2 -0
- package/_cjs/data/Patch/api.cjs.map +1 -1
- package/_cjs/data/Struct/api.cjs +2 -0
- package/_cjs/data/Struct/api.cjs.map +1 -1
- package/_cjs/data/Struct/definition.cjs +2 -4
- package/_cjs/data/Struct/definition.cjs.map +1 -1
- package/_cjs/data/These/definition.cjs +1 -1
- package/_cjs/data/These/definition.cjs.map +1 -1
- package/_cjs/data/Zipped.cjs +55 -0
- package/_cjs/data/Zipped.cjs.map +1 -0
- package/_cjs/data/function/api.cjs +10 -0
- package/_cjs/data/function/api.cjs.map +1 -1
- package/_cjs/data/object/instances.cjs +9 -1
- package/_cjs/data/object/instances.cjs.map +1 -1
- package/_cjs/data/string/api.cjs +1 -1
- package/_cjs/data.cjs +6 -0
- package/_cjs/data.cjs.map +1 -0
- package/_cjs/global.cjs +6 -0
- package/_cjs/global.cjs.map +1 -0
- package/_cjs/index.cjs +6 -0
- package/_cjs/index.cjs.map +1 -0
- package/_cjs/json.cjs +6 -0
- package/_cjs/json.cjs.map +1 -0
- package/_cjs/optics/At/definition.cjs +2 -0
- package/_cjs/optics/At/definition.cjs.map +1 -1
- package/_cjs/optics/Iso/definition.cjs +4 -0
- package/_cjs/optics/Iso/definition.cjs.map +1 -1
- package/_cjs/optics/Lens/definition.cjs +4 -0
- package/_cjs/optics/Lens/definition.cjs.map +1 -1
- package/_cjs/optics/Optional/definition.cjs +5 -5
- package/_cjs/optics/Optional/definition.cjs.map +1 -1
- package/_cjs/optics/Prism/definition.cjs +2 -0
- package/_cjs/optics/Prism/definition.cjs.map +1 -1
- package/_cjs/optics/Traversal/api/compose.cjs +1 -1
- package/_cjs/optics/Traversal/api/compose.cjs.map +1 -1
- package/_cjs/optics/Traversal/api/fromTraversable.cjs +1 -1
- package/_cjs/optics/Traversal/api/fromTraversable.cjs.map +1 -1
- package/_cjs/optics/Traversal/definition.cjs +7 -3
- package/_cjs/optics/Traversal/definition.cjs.map +1 -1
- package/_cjs/optics.cjs +6 -0
- package/_cjs/optics.cjs.map +1 -0
- package/_cjs/typeclass/Alt.cjs +0 -7
- package/_cjs/typeclass/Alt.cjs.map +1 -1
- package/_cjs/typeclass/ApplicativeExcept.cjs +9 -35
- package/_cjs/typeclass/ApplicativeExcept.cjs.map +1 -1
- package/_cjs/typeclass/Apply.cjs +39 -66
- package/_cjs/typeclass/Apply.cjs.map +1 -1
- package/_cjs/typeclass/Chain.cjs +6 -28
- package/_cjs/typeclass/Chain.cjs.map +1 -1
- package/_cjs/typeclass/Fail.cjs +0 -10
- package/_cjs/typeclass/Fail.cjs.map +1 -1
- package/_cjs/typeclass/Filterable.cjs +0 -36
- package/_cjs/typeclass/Filterable.cjs.map +1 -1
- package/_cjs/typeclass/Foldable.cjs +4 -34
- package/_cjs/typeclass/Foldable.cjs.map +1 -1
- package/_cjs/typeclass/FoldableWithIndex.cjs +4 -34
- package/_cjs/typeclass/FoldableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Functor.cjs +3 -18
- package/_cjs/typeclass/Functor.cjs.map +1 -1
- package/_cjs/typeclass/Guard/definition.cjs +3 -10
- package/_cjs/typeclass/Guard/definition.cjs.map +1 -1
- package/_cjs/typeclass/HashEq.cjs +2 -0
- package/_cjs/typeclass/HashEq.cjs.map +1 -1
- package/_cjs/typeclass/MonadExcept.cjs +2 -10
- package/_cjs/typeclass/MonadExcept.cjs.map +1 -1
- package/_cjs/typeclass/Monoid.cjs +2 -0
- package/_cjs/typeclass/Monoid.cjs.map +1 -1
- package/_cjs/typeclass/Nil.cjs +0 -10
- package/_cjs/typeclass/Nil.cjs.map +1 -1
- package/_cjs/typeclass/Ord/definition.cjs +2 -0
- package/_cjs/typeclass/Ord/definition.cjs.map +1 -1
- package/_cjs/typeclass/Ord/instances.cjs +4 -3
- package/_cjs/typeclass/Ord/instances.cjs.map +1 -1
- package/_cjs/typeclass/Pointed.cjs +0 -11
- package/_cjs/typeclass/Pointed.cjs.map +1 -1
- package/_cjs/typeclass/Semialign.cjs +18 -46
- package/_cjs/typeclass/Semialign.cjs.map +1 -1
- package/_cjs/typeclass/Semimonoidal.cjs +0 -11
- package/_cjs/typeclass/Semimonoidal.cjs.map +1 -1
- package/_cjs/typeclass/Showable/show.cjs +12 -12
- package/_cjs/typeclass/Showable/show.cjs.map +1 -1
- package/_cjs/typeclass/Traversable.cjs +7 -26
- package/_cjs/typeclass/Traversable.cjs.map +1 -1
- package/_cjs/typeclass/TraversableWithIndex.cjs +3 -7
- package/_cjs/typeclass/TraversableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Witherable.cjs +3 -45
- package/_cjs/typeclass/Witherable.cjs.map +1 -1
- package/_cjs/typeclass/WitherableWithIndex.cjs +8 -44
- package/_cjs/typeclass/WitherableWithIndex.cjs.map +1 -1
- package/_cjs/util.cjs +6 -0
- package/_cjs/util.cjs.map +1 -0
- package/_mjs/collection/Iterable/api/traverseConc.mjs +16 -21
- package/_mjs/collection/Iterable/api/traverseConc.mjs.map +1 -1
- package/_mjs/collection/compat/Array/api.mjs +10 -10
- package/_mjs/collection/compat/Array/derivations.mjs +70 -0
- package/_mjs/collection/compat/Array/derivations.mjs.map +1 -0
- package/_mjs/collection/compat/Array.mjs +1 -0
- package/_mjs/collection/compat/Array.mjs.map +1 -1
- package/_mjs/collection/compat/Record/instances.mjs +62 -16
- package/_mjs/collection/compat/Record/instances.mjs.map +1 -1
- package/_mjs/collection/compat.mjs +2 -0
- package/_mjs/collection/compat.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc/api.mjs +8 -11
- package/_mjs/collection/immutable/Conc/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/definition.mjs +41 -42
- package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/derivations.mjs +27 -0
- package/_mjs/collection/immutable/Conc/derivations.mjs.map +1 -0
- package/_mjs/collection/immutable/Conc.mjs +2 -1
- package/_mjs/collection/immutable/Conc.mjs.map +1 -1
- package/_mjs/collection/immutable/Dictionary/definition.mjs +2 -3
- package/_mjs/collection/immutable/Dictionary/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/api.mjs +18 -20
- package/_mjs/collection/immutable/HashMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/definition.mjs +15 -16
- package/_mjs/collection/immutable/HashMap/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet/api.mjs +1 -0
- package/_mjs/collection/immutable/HashSet/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api.mjs +134 -153
- package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/constructors.mjs +2 -2
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs +16 -12
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/derivations.mjs +25 -0
- package/_mjs/collection/immutable/ImmutableArray/derivations.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs +9 -8
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray.mjs +1 -0
- package/_mjs/collection/immutable/ImmutableArray.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +19 -19
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/constructors.mjs +2 -2
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs +0 -2
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/derivations.mjs +39 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/derivations.mjs.map +1 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs +4 -3
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray.mjs +1 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray.mjs.map +1 -1
- package/_mjs/collection/immutable/List/definition.mjs +2 -2
- package/_mjs/collection/immutable/RoseTree/definition.mjs +13 -14
- package/_mjs/collection/immutable/RoseTree/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/SortedMap/api.mjs +1 -0
- package/_mjs/collection/immutable/SortedMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/api.mjs +8 -12
- package/_mjs/collection/immutable/Vector/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/definition.mjs +11 -12
- package/_mjs/collection/immutable/Vector/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/internal.mjs +1 -1
- package/_mjs/collection/immutable.mjs +2 -0
- package/_mjs/collection/immutable.mjs.map +1 -0
- package/_mjs/collection/mutable/HashMap.mjs +4 -0
- package/_mjs/collection/mutable/HashMap.mjs.map +1 -1
- package/_mjs/collection/mutable.mjs +2 -0
- package/_mjs/collection/mutable.mjs.map +1 -0
- package/_mjs/collection/weak/IterableWeakMap.mjs +51 -2
- package/_mjs/collection/weak/IterableWeakMap.mjs.map +1 -1
- package/_mjs/collection/weak/IterableWeakSet.mjs +59 -7
- package/_mjs/collection/weak/IterableWeakSet.mjs.map +1 -1
- package/_mjs/collection/weak.mjs +2 -0
- package/_mjs/collection/weak.mjs.map +1 -0
- package/_mjs/collection.mjs +2 -0
- package/_mjs/collection.mjs.map +1 -0
- package/_mjs/control/Eval/api.mjs +9 -4
- package/_mjs/control/Eval/api.mjs.map +1 -1
- package/_mjs/control/Eval/definition.mjs +1 -2
- package/_mjs/control/Eval/definition.mjs.map +1 -1
- package/_mjs/control/Eval/instance.mjs +1 -0
- package/_mjs/control/Eval/instance.mjs.map +1 -1
- package/_mjs/control/Eval/run.mjs +1 -0
- package/_mjs/control/Eval/run.mjs.map +1 -1
- package/_mjs/control/Z/api.mjs +16 -15
- package/_mjs/control/Z/api.mjs.map +1 -1
- package/_mjs/control/Z/definition.mjs +3 -5
- package/_mjs/control/Z/definition.mjs.map +1 -1
- package/_mjs/control/Z/instances.mjs +1 -0
- package/_mjs/control/Z/instances.mjs.map +1 -1
- package/_mjs/control/Z/runtime.mjs +15 -13
- package/_mjs/control/Z/runtime.mjs.map +1 -1
- package/_mjs/control.mjs +2 -0
- package/_mjs/control.mjs.map +1 -0
- package/_mjs/data/Branded/derivations.mjs +1 -0
- package/_mjs/data/Branded/derivations.mjs.map +1 -1
- package/_mjs/data/Cause/api/isEmpty.mjs +1 -0
- package/_mjs/data/Cause/api/isEmpty.mjs.map +1 -1
- package/_mjs/data/Cause/api/linearize.mjs +1 -0
- package/_mjs/data/Cause/api/linearize.mjs.map +1 -1
- package/_mjs/data/Cause/api.mjs +2 -1
- package/_mjs/data/Cause/api.mjs.map +1 -1
- package/_mjs/data/Const/definition.mjs +0 -3
- package/_mjs/data/Const/definition.mjs.map +1 -1
- package/_mjs/data/Const/instances.mjs +7 -5
- package/_mjs/data/Const/instances.mjs.map +1 -1
- package/_mjs/data/Datum/api.mjs +404 -0
- package/_mjs/data/Datum/api.mjs.map +1 -0
- package/_mjs/data/Datum/definition.mjs +112 -0
- package/_mjs/data/Datum/definition.mjs.map +1 -0
- package/_mjs/data/Datum/instances.mjs +52 -0
- package/_mjs/data/Datum/instances.mjs.map +1 -0
- package/_mjs/data/DatumEither/api.mjs +290 -0
- package/_mjs/data/DatumEither/api.mjs.map +1 -0
- package/_mjs/data/DatumEither/definition.mjs +2 -0
- package/_mjs/data/DatumEither/definition.mjs.map +1 -0
- package/_mjs/data/DecodeError/definition.mjs +12 -3
- package/_mjs/data/DecodeError/definition.mjs.map +1 -1
- package/_mjs/data/DecodeError/instances.mjs +2 -0
- package/_mjs/data/DecodeError/instances.mjs.map +1 -0
- package/_mjs/data/DecodeError.mjs +1 -0
- package/_mjs/data/DecodeError.mjs.map +1 -1
- package/_mjs/data/Decoder/api.mjs +1 -0
- package/_mjs/data/Decoder/api.mjs.map +1 -1
- package/_mjs/data/Decoder/definition.mjs +0 -2
- package/_mjs/data/Decoder/definition.mjs.map +1 -1
- package/_mjs/data/Either/api/alignWith.mjs +1 -0
- package/_mjs/data/Either/api/alignWith.mjs.map +1 -1
- package/_mjs/data/Either/api.mjs +17 -4
- package/_mjs/data/Either/api.mjs.map +1 -1
- package/_mjs/data/Either/definition.mjs +1 -3
- package/_mjs/data/Either/definition.mjs.map +1 -1
- package/_mjs/data/Either/instances.mjs +24 -23
- package/_mjs/data/Either/instances.mjs.map +1 -1
- package/_mjs/data/EitherT/api.mjs +73 -0
- package/_mjs/data/EitherT/api.mjs.map +1 -0
- package/_mjs/data/EitherT/definition.mjs +2 -0
- package/_mjs/data/EitherT/definition.mjs.map +1 -0
- package/_mjs/data/Environment/api.mjs +12 -13
- package/_mjs/data/Environment/api.mjs.map +1 -1
- package/_mjs/data/Environment/definition.mjs.map +1 -1
- package/_mjs/data/Identity/api.mjs +2 -1
- package/_mjs/data/Identity/api.mjs.map +1 -1
- package/_mjs/data/Identity/definition.mjs +2 -3
- package/_mjs/data/Identity/definition.mjs.map +1 -1
- package/_mjs/data/Identity/instances.mjs +1 -0
- package/_mjs/data/Identity/instances.mjs.map +1 -1
- package/_mjs/data/Intervals.mjs +257 -0
- package/_mjs/data/Intervals.mjs.map +1 -0
- package/_mjs/data/Maybe/api.mjs +2 -1
- package/_mjs/data/Maybe/api.mjs.map +1 -1
- package/_mjs/data/Maybe/definition.mjs +8 -10
- package/_mjs/data/Maybe/definition.mjs.map +1 -1
- package/_mjs/data/Maybe/instances.mjs +12 -11
- package/_mjs/data/Maybe/instances.mjs.map +1 -1
- package/_mjs/data/Newtype.mjs +3 -4
- package/_mjs/data/Newtype.mjs.map +1 -1
- package/_mjs/data/Patch/api.mjs +1 -0
- package/_mjs/data/Patch/api.mjs.map +1 -1
- package/_mjs/data/Struct/api.mjs +1 -0
- package/_mjs/data/Struct/api.mjs.map +1 -1
- package/_mjs/data/Struct/definition.mjs +2 -3
- package/_mjs/data/Struct/definition.mjs.map +1 -1
- package/_mjs/data/These/definition.mjs +1 -1
- package/_mjs/data/These/definition.mjs.map +1 -1
- package/_mjs/data/Zipped.mjs +37 -0
- package/_mjs/data/Zipped.mjs.map +1 -0
- package/_mjs/data/function/api.mjs +8 -0
- package/_mjs/data/function/api.mjs.map +1 -1
- package/_mjs/data/object/instances.mjs +7 -1
- package/_mjs/data/object/instances.mjs.map +1 -1
- package/_mjs/data/string/api.mjs +1 -1
- package/_mjs/data.mjs +2 -0
- package/_mjs/data.mjs.map +1 -0
- package/_mjs/global.mjs +2 -0
- package/_mjs/global.mjs.map +1 -0
- package/_mjs/index.mjs +2 -0
- package/_mjs/index.mjs.map +1 -0
- package/_mjs/json.mjs +2 -0
- package/_mjs/json.mjs.map +1 -0
- package/_mjs/optics/At/api.mjs +1 -0
- package/_mjs/optics/At/api.mjs.map +1 -1
- package/_mjs/optics/At/definition.mjs +1 -0
- package/_mjs/optics/At/definition.mjs.map +1 -1
- package/_mjs/optics/Index/api.mjs +1 -0
- package/_mjs/optics/Index/api.mjs.map +1 -1
- package/_mjs/optics/Iso/api.mjs +1 -0
- package/_mjs/optics/Iso/api.mjs.map +1 -1
- package/_mjs/optics/Iso/definition.mjs +2 -0
- package/_mjs/optics/Iso/definition.mjs.map +1 -1
- package/_mjs/optics/Lens/api.mjs +1 -0
- package/_mjs/optics/Lens/api.mjs.map +1 -1
- package/_mjs/optics/Lens/definition.mjs +2 -0
- package/_mjs/optics/Lens/definition.mjs.map +1 -1
- package/_mjs/optics/Optional/api/compose.mjs +1 -0
- package/_mjs/optics/Optional/api/compose.mjs.map +1 -1
- package/_mjs/optics/Optional/definition.mjs +5 -5
- package/_mjs/optics/Optional/definition.mjs.map +1 -1
- package/_mjs/optics/Prism/api/compose.mjs +1 -0
- package/_mjs/optics/Prism/api/compose.mjs.map +1 -1
- package/_mjs/optics/Prism/api/fromNullable.mjs +1 -0
- package/_mjs/optics/Prism/api/fromNullable.mjs.map +1 -1
- package/_mjs/optics/Prism/api/just.mjs +1 -0
- package/_mjs/optics/Prism/api/just.mjs.map +1 -1
- package/_mjs/optics/Prism/definition.mjs +1 -0
- package/_mjs/optics/Prism/definition.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/compose.mjs +2 -1
- package/_mjs/optics/Traversal/api/compose.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/fromTraversable.mjs +2 -1
- package/_mjs/optics/Traversal/api/fromTraversable.mjs.map +1 -1
- package/_mjs/optics/Traversal/definition.mjs +5 -3
- package/_mjs/optics/Traversal/definition.mjs.map +1 -1
- package/_mjs/optics.mjs +2 -0
- package/_mjs/optics.mjs.map +1 -0
- package/_mjs/typeclass/Alt.mjs +0 -5
- package/_mjs/typeclass/Alt.mjs.map +1 -1
- package/_mjs/typeclass/ApplicativeExcept.mjs +7 -32
- package/_mjs/typeclass/ApplicativeExcept.mjs.map +1 -1
- package/_mjs/typeclass/Apply.mjs +35 -65
- package/_mjs/typeclass/Apply.mjs.map +1 -1
- package/_mjs/typeclass/Chain.mjs +4 -25
- package/_mjs/typeclass/Chain.mjs.map +1 -1
- package/_mjs/typeclass/Eq/derivations.mjs +1 -0
- package/_mjs/typeclass/Eq/derivations.mjs.map +1 -1
- package/_mjs/typeclass/Fail.mjs +1 -8
- package/_mjs/typeclass/Fail.mjs.map +1 -1
- package/_mjs/typeclass/Filterable.mjs +0 -28
- package/_mjs/typeclass/Filterable.mjs.map +1 -1
- package/_mjs/typeclass/Foldable.mjs +3 -30
- package/_mjs/typeclass/Foldable.mjs.map +1 -1
- package/_mjs/typeclass/FoldableWithIndex.mjs +3 -30
- package/_mjs/typeclass/FoldableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Functor.mjs +3 -16
- package/_mjs/typeclass/Functor.mjs.map +1 -1
- package/_mjs/typeclass/Guard/api.mjs +1 -0
- package/_mjs/typeclass/Guard/api.mjs.map +1 -1
- package/_mjs/typeclass/Guard/definition.mjs +0 -2
- package/_mjs/typeclass/Guard/definition.mjs.map +1 -1
- package/_mjs/typeclass/HashEq.mjs +1 -0
- package/_mjs/typeclass/HashEq.mjs.map +1 -1
- package/_mjs/typeclass/MonadExcept.mjs +2 -9
- package/_mjs/typeclass/MonadExcept.mjs.map +1 -1
- package/_mjs/typeclass/Monoid.mjs +1 -0
- package/_mjs/typeclass/Monoid.mjs.map +1 -1
- package/_mjs/typeclass/Nil.mjs +1 -8
- package/_mjs/typeclass/Nil.mjs.map +1 -1
- package/_mjs/typeclass/Ord/definition.mjs +1 -0
- package/_mjs/typeclass/Ord/definition.mjs.map +1 -1
- package/_mjs/typeclass/Ord/instances.mjs +3 -0
- package/_mjs/typeclass/Ord/instances.mjs.map +1 -1
- package/_mjs/typeclass/Pointed.mjs +0 -9
- package/_mjs/typeclass/Pointed.mjs.map +1 -1
- package/_mjs/typeclass/Semialign.mjs +17 -45
- package/_mjs/typeclass/Semialign.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/api.mjs +1 -0
- package/_mjs/typeclass/Semigroup/api.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/derivations.mjs +1 -0
- package/_mjs/typeclass/Semigroup/derivations.mjs.map +1 -1
- package/_mjs/typeclass/Semimonoidal.mjs +0 -9
- package/_mjs/typeclass/Semimonoidal.mjs.map +1 -1
- package/_mjs/typeclass/Showable/show.mjs +12 -12
- package/_mjs/typeclass/Showable/show.mjs.map +1 -1
- package/_mjs/typeclass/Traversable.mjs +6 -25
- package/_mjs/typeclass/Traversable.mjs.map +1 -1
- package/_mjs/typeclass/TraversableWithIndex.mjs +2 -6
- package/_mjs/typeclass/TraversableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Witherable.mjs +3 -40
- package/_mjs/typeclass/Witherable.mjs.map +1 -1
- package/_mjs/typeclass/WitherableWithIndex.mjs +6 -41
- package/_mjs/typeclass/WitherableWithIndex.mjs.map +1 -1
- package/_mjs/util.mjs +2 -0
- package/_mjs/util.mjs.map +1 -0
- package/_src/collection/Iterable/api/traverseConc.ts +24 -21
- package/_src/collection/compat/Array/api.ts +10 -10
- package/_src/collection/compat/Array/definition.ts +3 -3
- package/_src/collection/compat/Array/derivations.ts +85 -0
- package/_src/collection/compat/Array.ts +1 -0
- package/_src/collection/compat/Record/instances.ts +43 -0
- package/_src/collection/compat.ts +4 -0
- package/_src/collection/immutable/Conc/api.ts +9 -11
- package/_src/collection/immutable/Conc/definition.ts +18 -13
- package/_src/collection/immutable/Conc/derivations.ts +28 -0
- package/_src/collection/immutable/Conc.ts +1 -0
- package/_src/collection/immutable/Dictionary/definition.ts +1 -1
- package/_src/collection/immutable/HashMap/api.ts +20 -17
- package/_src/collection/immutable/HashMap/definition.ts +10 -6
- package/_src/collection/immutable/ImmutableArray/api.ts +62 -119
- package/_src/collection/immutable/ImmutableArray/constructors.ts +2 -2
- package/_src/collection/immutable/ImmutableArray/definition.ts +11 -5
- package/_src/collection/immutable/ImmutableArray/derivations.ts +28 -0
- package/_src/collection/immutable/ImmutableArray/instances.ts +47 -42
- package/_src/collection/immutable/ImmutableArray.ts +1 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray/api.ts +13 -11
- package/_src/collection/immutable/ImmutableNonEmptyArray/constructors.ts +2 -2
- package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +10 -5
- package/_src/collection/immutable/ImmutableNonEmptyArray/derivations.ts +44 -0
- package/_src/collection/immutable/ImmutableNonEmptyArray/instances.ts +24 -25
- package/_src/collection/immutable/ImmutableNonEmptyArray.ts +1 -0
- package/_src/collection/immutable/List/definition.ts +2 -2
- package/_src/collection/immutable/RoseTree/definition.ts +7 -4
- package/_src/collection/immutable/Vector/api.ts +12 -16
- package/_src/collection/immutable/Vector/definition.ts +10 -10
- package/_src/collection/immutable/Vector/internal.ts +1 -1
- package/_src/collection/immutable.ts +12 -0
- package/_src/collection/mutable/HashMap.ts +4 -0
- package/_src/collection/mutable.ts +6 -0
- package/_src/collection/weak/IterableWeakMap.ts +50 -5
- package/_src/collection/weak/IterableWeakSet.ts +57 -9
- package/_src/collection/weak.ts +4 -0
- package/_src/collection.ts +7 -0
- package/_src/control/Eval/api.ts +5 -2
- package/_src/control/Eval/definition.ts +8 -5
- package/_src/control/Eval/instance.ts +7 -7
- package/_src/control/Z/api.ts +40 -52
- package/_src/control/Z/definition.ts +36 -36
- package/_src/control/Z/instances.ts +3 -3
- package/_src/control/Z/runtime.ts +11 -11
- package/_src/control.ts +5 -0
- package/_src/data/Const/definition.ts +9 -17
- package/_src/data/Const/instances.ts +5 -5
- package/_src/data/Datum/api.ts +376 -0
- package/_src/data/Datum/definition.ts +102 -0
- package/_src/data/Datum/instances.ts +34 -0
- package/_src/data/DatumEither/api.ts +348 -0
- package/_src/data/DatumEither/definition.ts +20 -0
- package/_src/data/DecodeError/definition.ts +11 -3
- package/_src/data/DecodeError/instances.ts +0 -0
- package/_src/data/DecodeError.ts +1 -0
- package/_src/data/Decoder/definition.ts +7 -4
- package/_src/data/Either/api.ts +12 -2
- package/_src/data/Either/definition.ts +10 -15
- package/_src/data/Either/instances.ts +6 -6
- package/_src/data/EitherT/api.ts +239 -0
- package/_src/data/EitherT/definition.ts +23 -0
- package/_src/data/Environment/api.ts +8 -6
- package/_src/data/Environment/definition.ts +2 -2
- package/_src/data/Identity/api.ts +2 -2
- package/_src/data/Identity/definition.ts +2 -2
- package/_src/data/Identity/instances.ts +7 -7
- package/_src/data/Intervals.ts +126 -0
- package/_src/data/Maybe/api.ts +2 -2
- package/_src/data/Maybe/definition.ts +8 -5
- package/_src/data/Maybe/instances.ts +10 -10
- package/_src/data/Newtype.ts +32 -11
- package/_src/data/Struct/definition.ts +1 -1
- package/_src/data/Tag/definition.ts +2 -2
- package/_src/data/These/definition.ts +1 -1
- package/_src/data/Zipped.ts +52 -0
- package/_src/data/function/api.ts +8 -0
- package/_src/data/object/instances.ts +11 -1
- package/_src/data/string/api.ts +1 -1
- package/_src/data.ts +35 -0
- package/_src/global.ts +252 -0
- package/_src/index.ts +8 -0
- package/_src/json.ts +5 -0
- package/_src/optics/Optional/definition.ts +2 -2
- package/_src/optics/Traversal/api/compose.ts +1 -1
- package/_src/optics/Traversal/api/fromTraversable.ts +11 -11
- package/_src/optics/Traversal/definition.ts +13 -12
- package/_src/optics.ts +12 -0
- package/_src/typeclass/Align.ts +1 -1
- package/_src/typeclass/Alt.ts +24 -54
- package/_src/typeclass/Alternative.ts +1 -1
- package/_src/typeclass/Applicative.ts +6 -1
- package/_src/typeclass/ApplicativeExcept.ts +55 -81
- package/_src/typeclass/Apply.ts +224 -253
- package/_src/typeclass/Chain.ts +71 -98
- package/_src/typeclass/Fail.ts +10 -28
- package/_src/typeclass/Filterable.ts +13 -67
- package/_src/typeclass/FilterableWithIndex.ts +13 -13
- package/_src/typeclass/Foldable.ts +16 -35
- package/_src/typeclass/FoldableWithIndex.ts +14 -37
- package/_src/typeclass/Functor.ts +11 -21
- package/_src/typeclass/FunctorWithIndex.ts +4 -4
- package/_src/typeclass/Guard/definition.ts +1 -3
- package/_src/typeclass/Monad.ts +1 -1
- package/_src/typeclass/MonadExcept.ts +11 -7
- package/_src/typeclass/Nil.ts +10 -27
- package/_src/typeclass/Pointed.ts +11 -30
- package/_src/typeclass/Semialign.ts +285 -253
- package/_src/typeclass/Semimonoidal.ts +23 -54
- package/_src/typeclass/Showable/show.ts +10 -12
- package/_src/typeclass/Traversable.ts +45 -63
- package/_src/typeclass/TraversableWithIndex.ts +37 -34
- package/_src/typeclass/Witherable.ts +28 -115
- package/_src/typeclass/WitherableWithIndex.ts +82 -115
- package/_src/types/extractions.ts +1 -1
- package/_src/util.ts +8 -0
- package/collection/Iterable/api/traverseConc.d.ts +4 -6
- package/collection/compat/Array/api.d.ts +10 -10
- package/collection/compat/Array/definition.d.ts +3 -3
- package/collection/compat/Array/derivations.d.ts +24 -0
- package/collection/compat/Array.d.ts +1 -0
- package/collection/compat/Record/instances.d.ts +12 -0
- package/collection/compat.d.ts +2 -0
- package/collection/immutable/Conc/api.d.ts +4 -6
- package/collection/immutable/Conc/definition.d.ts +24 -20
- package/collection/immutable/Conc/derivations.d.ts +14 -0
- package/collection/immutable/Conc.d.ts +1 -0
- package/collection/immutable/Dictionary/definition.d.ts +1 -1
- package/collection/immutable/HashMap/api.d.ts +13 -13
- package/collection/immutable/HashMap/definition.d.ts +10 -7
- package/collection/immutable/ImmutableArray/api.d.ts +22 -24
- package/collection/immutable/ImmutableArray/constructors.d.ts +2 -2
- package/collection/immutable/ImmutableArray/definition.d.ts +12 -6
- package/collection/immutable/ImmutableArray/derivations.d.ts +14 -0
- package/collection/immutable/ImmutableArray/instances.d.ts +17 -17
- package/collection/immutable/ImmutableArray.d.ts +1 -0
- package/collection/immutable/ImmutableNonEmptyArray/api.d.ts +6 -5
- package/collection/immutable/ImmutableNonEmptyArray/constructors.d.ts +2 -2
- package/collection/immutable/ImmutableNonEmptyArray/definition.d.ts +9 -5
- package/collection/immutable/ImmutableNonEmptyArray/derivations.d.ts +14 -0
- package/collection/immutable/ImmutableNonEmptyArray/instances.d.ts +10 -10
- package/collection/immutable/ImmutableNonEmptyArray.d.ts +1 -0
- package/collection/immutable/List/definition.d.ts +2 -2
- package/collection/immutable/RoseTree/definition.d.ts +7 -5
- package/collection/immutable/Vector/api.d.ts +4 -4
- package/collection/immutable/Vector/definition.d.ts +9 -10
- package/collection/immutable/Vector/internal.d.ts +1 -1
- package/collection/immutable.d.ts +10 -0
- package/collection/mutable/HashMap.d.ts +1 -0
- package/collection/mutable.d.ts +4 -0
- package/collection/weak/IterableWeakMap.d.ts +9 -3
- package/collection/weak/IterableWeakSet.d.ts +10 -4
- package/collection/weak.d.ts +2 -0
- package/collection.d.ts +5 -0
- package/control/Eval/api.d.ts +6 -1
- package/control/Eval/definition.d.ts +6 -4
- package/control/Eval/instance.d.ts +3 -3
- package/control/Z/api.d.ts +32 -30
- package/control/Z/definition.d.ts +43 -37
- package/control/Z/instances.d.ts +2 -2
- package/control/Z/runtime.d.ts +9 -8
- package/control.d.ts +3 -0
- package/data/Const/definition.d.ts +8 -16
- package/data/Const/instances.d.ts +4 -3
- package/data/Datum/api.d.ts +188 -0
- package/data/Datum/definition.d.ts +75 -0
- package/data/Datum/instances.d.ts +32 -0
- package/data/DatumEither/api.d.ts +169 -0
- package/data/DatumEither/definition.d.ts +21 -0
- package/data/DecodeError/definition.d.ts +6 -0
- package/data/DecodeError/instances.d.ts +1 -0
- package/data/DecodeError.d.ts +1 -0
- package/data/Decoder/definition.d.ts +6 -4
- package/data/Either/api.d.ts +10 -0
- package/data/Either/definition.d.ts +8 -14
- package/data/Either/instances.d.ts +4 -3
- package/data/EitherT/api.d.ts +60 -0
- package/data/EitherT/definition.d.ts +12 -0
- package/data/Environment/api.d.ts +7 -5
- package/data/Environment/definition.d.ts +3 -3
- package/data/Identity/api.d.ts +2 -1
- package/data/Identity/definition.d.ts +2 -2
- package/data/Identity/instances.d.ts +3 -3
- package/data/Intervals.d.ts +53 -0
- package/data/Maybe/api.d.ts +2 -1
- package/data/Maybe/definition.d.ts +10 -5
- package/data/Maybe/instances.d.ts +6 -6
- package/data/Newtype.d.ts +9 -8
- package/data/Struct/definition.d.ts +1 -1
- package/data/Tag/definition.d.ts +2 -2
- package/data/Zipped.d.ts +24 -0
- package/data/function/api.d.ts +6 -0
- package/data/object/instances.d.ts +6 -1
- package/data/string/api.d.ts +1 -1
- package/data.d.ts +33 -0
- package/global.d.ts +237 -0
- package/index.d.ts +8 -0
- package/json.d.ts +3 -0
- package/optics/Traversal/api/fromTraversable.d.ts +1 -1
- package/optics/Traversal/definition.d.ts +2 -4
- package/optics.d.ts +10 -0
- package/package.json +6 -2
- package/typeclass/Align.d.ts +1 -1
- package/typeclass/Alt.d.ts +2 -4
- package/typeclass/Alternative.d.ts +1 -1
- package/typeclass/Applicative.d.ts +2 -1
- package/typeclass/ApplicativeExcept.d.ts +5 -13
- package/typeclass/Apply.d.ts +20 -32
- package/typeclass/Chain.d.ts +5 -13
- package/typeclass/Fail.d.ts +2 -7
- package/typeclass/Filterable.d.ts +7 -31
- package/typeclass/FilterableWithIndex.d.ts +7 -7
- package/typeclass/Foldable.d.ts +6 -19
- package/typeclass/FoldableWithIndex.d.ts +6 -19
- package/typeclass/Functor.d.ts +4 -11
- package/typeclass/FunctorWithIndex.d.ts +2 -2
- package/typeclass/Guard/definition.d.ts +1 -4
- package/typeclass/Monad.d.ts +1 -1
- package/typeclass/MonadExcept.d.ts +3 -4
- package/typeclass/Nil.d.ts +2 -7
- package/typeclass/Pointed.d.ts +2 -7
- package/typeclass/Semialign.d.ts +26 -32
- package/typeclass/Semimonoidal.d.ts +3 -8
- package/typeclass/Showable/show.d.ts +1 -1
- package/typeclass/Traversable.d.ts +21 -12
- package/typeclass/TraversableWithIndex.d.ts +19 -6
- package/typeclass/Witherable.d.ts +5 -19
- package/typeclass/WitherableWithIndex.d.ts +33 -19
- package/types/extractions.d.ts +1 -1
- package/util.d.ts +6 -0
@@ -2,12 +2,12 @@ import { HKT } from "@fncts/typelevel/HKT";
|
|
2
2
|
/**
|
3
3
|
* @tsplus type fncts.ConstF
|
4
4
|
*/
|
5
|
-
export interface ConstF extends
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
export interface ConstF extends HKT {
|
6
|
+
type: Const<this["E"], this["A"]>;
|
7
|
+
variance: {
|
8
|
+
E: "_";
|
9
|
+
A: "+";
|
10
|
+
};
|
11
11
|
}
|
12
12
|
/**
|
13
13
|
* @tsplus type fncts.Const
|
@@ -15,15 +15,7 @@ export interface Const1F<E> extends Const1<E, any> {
|
|
15
15
|
*/
|
16
16
|
export declare class Const<E, A> {
|
17
17
|
readonly getConst: E;
|
18
|
-
readonly
|
19
|
-
readonly
|
20
|
-
readonly [HKT.A]: () => A;
|
21
|
-
readonly [HKT.T]: Const<HKT._E<this>, HKT._A<this>>;
|
18
|
+
readonly _E: () => E;
|
19
|
+
readonly _A: () => A;
|
22
20
|
constructor(getConst: E);
|
23
21
|
}
|
24
|
-
export interface Const1<E, A> {
|
25
|
-
readonly [HKT.F]: ConstF;
|
26
|
-
readonly [HKT.E]: () => E;
|
27
|
-
readonly [HKT.A]: () => A;
|
28
|
-
readonly [HKT.T]: Const<E, HKT._A<this>>;
|
29
|
-
}
|
@@ -1,12 +1,13 @@
|
|
1
|
+
import { HKT } from "@fncts/typelevel/HKT";
|
1
2
|
import type * as P from "../../typeclass.js";
|
2
|
-
import type {
|
3
|
+
import type { ConstF } from "@fncts/base/data/Const/definition";
|
3
4
|
/**
|
4
5
|
* @tsplus static fncts.ConstOps getApply
|
5
6
|
* @tsplus location "@fncts/base/data/Const/instances"
|
6
7
|
*/
|
7
|
-
export declare function getApply<E>(S: P.Semigroup<E>): P.Apply<
|
8
|
+
export declare function getApply<E>(S: P.Semigroup<E>): P.Apply<ConstF, import("@fncts/typelevel/HKT.js").HKT.Fix<"E", E>>;
|
8
9
|
/**
|
9
10
|
* @tsplus static fncts.ConstOps getApplicative
|
10
11
|
* @tsplus location "@fncts/base/data/Const/instances"
|
11
12
|
*/
|
12
|
-
export declare function getApplicative<E>(M: P.Monoid<E>): P.Applicative<
|
13
|
+
export declare function getApplicative<E>(M: P.Monoid<E>): P.Applicative<ConstF, HKT.Fix<"E", E>>;
|
@@ -0,0 +1,188 @@
|
|
1
|
+
import { Datum } from "@fncts/base/data/Datum/definition";
|
2
|
+
import { Refinement } from "@fncts/base/data/Refinement/definition";
|
3
|
+
import { Predicate } from "@fncts/base/data/Predicate/definition";
|
4
|
+
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
5
|
+
import { Lazy } from "@fncts/base/data/function/definition";
|
6
|
+
import { Either } from "@fncts/base/data/Either/definition";
|
7
|
+
import type { DatumF } from "@fncts/base/data/Datum/definition";
|
8
|
+
import type * as P from "@fncts/base/typeclass";
|
9
|
+
import type { Eq } from "@fncts/base/typeclass/Eq";
|
10
|
+
import { Initial, Pending, Refresh, Replete } from "@fncts/base/data/Datum/definition";
|
11
|
+
import { Zipped } from "@fncts/base/data/Zipped";
|
12
|
+
/**
|
13
|
+
* @tsplus static fncts.DatumOps initial
|
14
|
+
* @tsplus static fncts.Datum.InitialOps __call
|
15
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
16
|
+
*/
|
17
|
+
export declare function initial<A = never>(): Datum<A>;
|
18
|
+
/**
|
19
|
+
* @tsplus static fncts.DatumOps pending
|
20
|
+
* @tsplus static fncts.Datum.PendingOps __call
|
21
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
22
|
+
*/
|
23
|
+
export declare function pending<A = never>(): Datum<A>;
|
24
|
+
/**
|
25
|
+
* @tsplus static fncts.DatumOps refresh
|
26
|
+
* @tsplus static fncts.Datum.RefreshOps __call
|
27
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
28
|
+
*/
|
29
|
+
export declare function refresh<A>(value: A): Datum<A>;
|
30
|
+
/**
|
31
|
+
* @tsplus static fncts.DatumOps replete
|
32
|
+
* @tsplus static fncts.Datum.RepleteOps __call
|
33
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
34
|
+
*/
|
35
|
+
export declare function replete<A>(value: A): Datum<A>;
|
36
|
+
/**
|
37
|
+
* @tsplus getter fncts.Datum value
|
38
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
39
|
+
*/
|
40
|
+
export declare function left<E, A>(self: Datum<A>): A | undefined;
|
41
|
+
/**
|
42
|
+
* @tsplus fluent fncts.Datum isInitial
|
43
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
44
|
+
*/
|
45
|
+
export declare function isInitial<A>(self: Datum<A>): self is Initial;
|
46
|
+
/**
|
47
|
+
* @tsplus fluent fncts.Datum isPending
|
48
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
49
|
+
*/
|
50
|
+
export declare function isPending<A>(self: Datum<A>): self is Pending;
|
51
|
+
/**
|
52
|
+
* @tsplus fluent fncts.Datum isRefresh
|
53
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
54
|
+
*/
|
55
|
+
export declare function isRefresh<A>(self: Datum<A>): self is Refresh<A>;
|
56
|
+
/**
|
57
|
+
* @tsplus fluent fncts.Datum isReplete
|
58
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
59
|
+
*/
|
60
|
+
export declare function isReplete<A>(self: Datum<A>): self is Replete<A>;
|
61
|
+
/**
|
62
|
+
* @tsplus fluent fncts.Datum isEmpty
|
63
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
64
|
+
*/
|
65
|
+
export declare function isEmpty<A>(self: Datum<A>): self is Initial | Pending;
|
66
|
+
/**
|
67
|
+
* @tsplus fluent fncts.Datum isNonEmpty
|
68
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
69
|
+
*/
|
70
|
+
export declare function isNonEmpty<A>(self: Datum<A>): self is Refresh<A> | Replete<A>;
|
71
|
+
/**
|
72
|
+
* @tsplus fluent fncts.Datum isLoading
|
73
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
74
|
+
*/
|
75
|
+
export declare function isLoading<A>(self: Datum<A>): self is Pending | Refresh<A>;
|
76
|
+
/**
|
77
|
+
* @tsplus fluent fncts.Datum elem
|
78
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
79
|
+
*/
|
80
|
+
export declare function elem<A>(self: Datum<A>, a: A, /** @tsplus auto */ E: Eq<A>): boolean;
|
81
|
+
/**
|
82
|
+
* @tsplus fluent fncts.Datum exists
|
83
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
84
|
+
*/
|
85
|
+
export declare function exists<A, B extends A>(self: Datum<A>, p: Refinement<A, B>): self is Datum<B>;
|
86
|
+
export declare function exists<A>(self: Datum<A>, p: Predicate<A>): boolean;
|
87
|
+
/**
|
88
|
+
* @tsplus fluent fncts.Datum extend
|
89
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
90
|
+
*/
|
91
|
+
export declare function extend<A, B>(self: Datum<A>, f: (wa: Datum<A>) => B): Datum<B>;
|
92
|
+
/**
|
93
|
+
* @tsplus fluent fncts.Datum filter
|
94
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
95
|
+
*/
|
96
|
+
export declare function filter<A, B extends A>(self: Datum<A>, p: Refinement<A, B>): Datum<B>;
|
97
|
+
export declare function filter<A>(self: Datum<A>, p: Predicate<A>): Datum<A>;
|
98
|
+
/**
|
99
|
+
* @tsplus fluent fncts.Datum filterMap
|
100
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
101
|
+
*/
|
102
|
+
export declare function filterMap<A, B>(self: Datum<A>, f: (a: A) => Maybe<B>): Datum<B>;
|
103
|
+
/**
|
104
|
+
* @tsplus fluent fncts.Datum flatMap
|
105
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
106
|
+
*/
|
107
|
+
export declare function flatMap<A, B>(self: Datum<A>, f: (a: A) => Datum<B>): Datum<B>;
|
108
|
+
/**
|
109
|
+
* @tsplus fluent fncts.Datum foldLeft
|
110
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
111
|
+
*/
|
112
|
+
export declare function foldLeft<A, B>(self: Datum<A>, b: B, f: (b: B, a: A) => B): B;
|
113
|
+
/**
|
114
|
+
* @tsplus fluent fncts.Datum foldMap
|
115
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
116
|
+
*/
|
117
|
+
export declare function foldMap<A, M>(self: Datum<A>, f: (a: A) => M, /** @tsplus auto */ M: P.Monoid<M>): M;
|
118
|
+
/**
|
119
|
+
* @tsplus fluent fncts.Datum foldRight
|
120
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
121
|
+
*/
|
122
|
+
export declare function foldRight<A, B>(self: Datum<A>, b: B, f: (a: A, b: B) => B): B;
|
123
|
+
/**
|
124
|
+
* @tsplus fluent fncts.Datum getOrElse
|
125
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
126
|
+
*/
|
127
|
+
export declare function getOrElse<A, B>(self: Datum<A>, b: Lazy<B>): A | B;
|
128
|
+
/**
|
129
|
+
* @tsplus fluent fncts.Datum match
|
130
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
131
|
+
*/
|
132
|
+
export declare function match<A, B, C, D, E>(self: Datum<A>, cases: {
|
133
|
+
Initial: () => B;
|
134
|
+
Pending: () => C;
|
135
|
+
Refresh: (a: A) => D;
|
136
|
+
Replete: (a: A) => E;
|
137
|
+
}): B | C | D | E;
|
138
|
+
/**
|
139
|
+
* @tsplus fluent fncts.Datum match2
|
140
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
141
|
+
*/
|
142
|
+
export declare function match2<A, B, C>(self: Datum<A>, onEmpty: (isLoading: boolean) => B, onValue: (a: A, isLoading: boolean) => C): B | C;
|
143
|
+
/**
|
144
|
+
* @tsplus fluent fncts.Datum map
|
145
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
146
|
+
*/
|
147
|
+
export declare function map<A, B>(self: Datum<A>, f: (a: A) => B): Datum<B>;
|
148
|
+
/**
|
149
|
+
* @tsplus fluent fncts.Datum orElse
|
150
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
151
|
+
*/
|
152
|
+
export declare function orElse<A, B>(self: Datum<A>, that: Lazy<Datum<B>>): Datum<A | B>;
|
153
|
+
/**
|
154
|
+
* @tsplus fluent fncts.Datum partition
|
155
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
156
|
+
*/
|
157
|
+
export declare function partition<A, B extends A>(self: Datum<A>, p: Refinement<A, B>): [Datum<A>, Datum<B>];
|
158
|
+
export declare function partition<A>(self: Datum<A>, p: Predicate<A>): [Datum<A>, Datum<A>];
|
159
|
+
/**
|
160
|
+
* @tsplus fluent fncts.Datum partitionMap
|
161
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
162
|
+
*/
|
163
|
+
export declare function partitionMap<A, B, C>(self: Datum<A>, f: (a: A) => Either<B, C>): [Datum<B>, Datum<C>];
|
164
|
+
/**
|
165
|
+
* @tsplus getter fncts.Datum toPending
|
166
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
167
|
+
*/
|
168
|
+
export declare function toPending<A>(self: Datum<A>): Datum<A>;
|
169
|
+
/**
|
170
|
+
* @tsplus getter fncts.Datum toReplete
|
171
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
172
|
+
*/
|
173
|
+
export declare function toReplete<A>(self: Datum<A>): Datum<A>;
|
174
|
+
/**
|
175
|
+
* @tsplus fluent fncts.Datum traverse
|
176
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
177
|
+
*/
|
178
|
+
export declare const traverse: P.Traversable<DatumF>["traverse"];
|
179
|
+
/**
|
180
|
+
* @tsplus fluent fncts.Datum zip
|
181
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
182
|
+
*/
|
183
|
+
export declare function zip<A, B>(self: Datum<A>, that: Datum<B>): Datum<Zipped.Make<A, B>>;
|
184
|
+
/**
|
185
|
+
* @tsplus fluent fncts.Datum zipWith
|
186
|
+
* @tsplus location "@fncts/base/data/Datum/api"
|
187
|
+
*/
|
188
|
+
export declare function zipWith<A, B, C>(self: Datum<A>, that: Datum<B>, f: (a: A, b: B) => C): Datum<C>;
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import { HKT } from "@fncts/typelevel/HKT";
|
2
|
+
import { Hashable } from "@fncts/base/typeclass/Hashable";
|
3
|
+
import { Equatable } from "@fncts/base/typeclass/Equatable";
|
4
|
+
export declare const enum DatumTag {
|
5
|
+
Initial = "Initial",
|
6
|
+
Pending = "Pending",
|
7
|
+
Refresh = "Refresh",
|
8
|
+
Replete = "Replete"
|
9
|
+
}
|
10
|
+
export declare const DatumTypeId: unique symbol;
|
11
|
+
export declare type DatumTypeId = typeof DatumTypeId;
|
12
|
+
export interface DatumF extends HKT {
|
13
|
+
type: Datum<this["A"]>;
|
14
|
+
variance: {
|
15
|
+
A: "+";
|
16
|
+
};
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* @tsplus type fncts.Datum
|
20
|
+
*/
|
21
|
+
export declare type Datum<A> = Initial | Pending | Refresh<A> | Replete<A>;
|
22
|
+
/**
|
23
|
+
* @tsplus type fncts.DatumOps
|
24
|
+
*/
|
25
|
+
export interface DatumOps {
|
26
|
+
}
|
27
|
+
export declare const Datum: DatumOps;
|
28
|
+
/**
|
29
|
+
* @tsplus type fncts.Datum.Initial
|
30
|
+
* @tsplus companion fncts.Datum.InitialOps
|
31
|
+
*/
|
32
|
+
export declare class Initial implements Hashable, Equatable {
|
33
|
+
readonly _tag = DatumTag.Initial;
|
34
|
+
get [Symbol.hash](): number;
|
35
|
+
[Symbol.equals](that: unknown): boolean;
|
36
|
+
}
|
37
|
+
/**
|
38
|
+
* @tsplus type fncts.Datum.Pending
|
39
|
+
* @tsplus companion fncts.Datum.PendingOps
|
40
|
+
*/
|
41
|
+
export declare class Pending implements Hashable, Equatable {
|
42
|
+
readonly _typeId: DatumTypeId;
|
43
|
+
readonly _tag = DatumTag.Pending;
|
44
|
+
get [Symbol.hash](): number;
|
45
|
+
[Symbol.equals](that: unknown): boolean;
|
46
|
+
}
|
47
|
+
/**
|
48
|
+
* @tsplus type fncts.Datum.Refresh
|
49
|
+
* @tsplus companion fncts.Datum.RefreshOps
|
50
|
+
*/
|
51
|
+
export declare class Refresh<A> implements Hashable, Equatable {
|
52
|
+
readonly value: A;
|
53
|
+
readonly _typeId: DatumTypeId;
|
54
|
+
readonly _tag = DatumTag.Refresh;
|
55
|
+
constructor(value: A);
|
56
|
+
get [Symbol.hash](): number;
|
57
|
+
[Symbol.equals](that: unknown): boolean;
|
58
|
+
}
|
59
|
+
/**
|
60
|
+
* @tsplus type fncts.Datum.Replete
|
61
|
+
* @tsplus companion fncts.Datum.RepleteOps
|
62
|
+
*/
|
63
|
+
export declare class Replete<A> implements Hashable, Equatable {
|
64
|
+
readonly value: A;
|
65
|
+
readonly _typeId: DatumTypeId;
|
66
|
+
readonly _tag = DatumTag.Replete;
|
67
|
+
constructor(value: A);
|
68
|
+
get [Symbol.hash](): number;
|
69
|
+
[Symbol.equals](that: unknown): boolean;
|
70
|
+
}
|
71
|
+
/**
|
72
|
+
* @tsplus static fncts.DatumOps is
|
73
|
+
* @tsplus location "@fncts/base/data/Datum/definition"
|
74
|
+
*/
|
75
|
+
export declare function isDatum(u: unknown): u is Datum<unknown>;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import type { DatumF } from "./definition.js";
|
2
|
+
import type * as P from "@fncts/base/typeclass";
|
3
|
+
/**
|
4
|
+
* @tsplus static fncts.DatumOps Functor
|
5
|
+
* @tsplus implicit
|
6
|
+
* @tsplus location "@fncts/base/data/Datum/instances"
|
7
|
+
*/
|
8
|
+
export declare const Functor: P.Functor<DatumF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
9
|
+
/**
|
10
|
+
* @tsplus static fncts.DatumOps Semimonoidal
|
11
|
+
* @tsplus implicit
|
12
|
+
* @tsplus location "@fncts/base/data/Datum/instances"
|
13
|
+
*/
|
14
|
+
export declare const Semimonoidal: P.Semimonoidal<DatumF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
15
|
+
/**
|
16
|
+
* @tsplus static fncts.DatumOps Apply
|
17
|
+
* @tsplus implicit
|
18
|
+
* @tsplus location "@fncts/base/data/Datum/instances"
|
19
|
+
*/
|
20
|
+
export declare const Apply: P.Apply<DatumF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
21
|
+
/**
|
22
|
+
* @tsplus static fncts.DatumOps Applicative
|
23
|
+
* @tsplus implicit
|
24
|
+
* @tsplus location "@fncts/base/data/Datum/instances"
|
25
|
+
*/
|
26
|
+
export declare const Applicative: P.Applicative<DatumF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
27
|
+
/**
|
28
|
+
* @tsplus static fncts.DatumOps Monad
|
29
|
+
* @tsplus implicit
|
30
|
+
* @tsplus location "@fncts/base/data/Datum/instances"
|
31
|
+
*/
|
32
|
+
export declare const Monad: P.Monad<DatumF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
@@ -0,0 +1,169 @@
|
|
1
|
+
import { DatumEither } from "@fncts/base/data/DatumEither/definition";
|
2
|
+
import { Refinement } from "@fncts/base/data/Refinement/definition";
|
3
|
+
import { Predicate } from "@fncts/base/data/Predicate/definition";
|
4
|
+
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
5
|
+
import { Either } from "@fncts/base/data/Either/definition";
|
6
|
+
import { Lazy } from "@fncts/base/data/function/definition";
|
7
|
+
import { Zipped } from "@fncts/base/data/Zipped";
|
8
|
+
import type { DatumEitherF } from "@fncts/base/data/DatumEither/definition";
|
9
|
+
import type * as P from "@fncts/base/typeclass";
|
10
|
+
/**
|
11
|
+
* @tsplus static fncts.DatumEitherOps initial
|
12
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
13
|
+
*/
|
14
|
+
export declare function initial<E = never, A = never>(): DatumEither<E, A>;
|
15
|
+
/**
|
16
|
+
* @tsplus static fncts.DatumEitherOps pending
|
17
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
18
|
+
*/
|
19
|
+
export declare function pending<E = never, A = never>(): DatumEither<E, A>;
|
20
|
+
/**
|
21
|
+
* @tsplus static fncts.DatumEitherOps refreshLeft
|
22
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
23
|
+
*/
|
24
|
+
export declare function refreshLeft<E, A = never>(e: E): DatumEither<E, A>;
|
25
|
+
/**
|
26
|
+
* @tsplus static fncts.DatumEitherOps refreshRight
|
27
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
28
|
+
*/
|
29
|
+
export declare function refreshRight<E = never, A = never>(a: A): DatumEither<E, A>;
|
30
|
+
/**
|
31
|
+
* @tsplus static fncts.DatumEitherOps repleteLeft
|
32
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
33
|
+
*/
|
34
|
+
export declare function repleteLeft<E, A = never>(e: E): DatumEither<E, A>;
|
35
|
+
/**
|
36
|
+
* @tsplus static fncts.DatumEitherOps repleteRight
|
37
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
38
|
+
*/
|
39
|
+
export declare function repleteRight<E = never, A = never>(a: A): DatumEither<E, A>;
|
40
|
+
/**
|
41
|
+
* @tsplus fluent fncts.DatumEither bimap
|
42
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
43
|
+
*/
|
44
|
+
export declare const bimap: <E, A, E1, B>(self: DatumEither<E, A>, f: (e: E) => E1, g: (a: A) => B) => DatumEither<E1, B>;
|
45
|
+
/**
|
46
|
+
* @tsplus fluent fncts.DatumEither exists
|
47
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
48
|
+
*/
|
49
|
+
export declare function exists<E, A, B extends A>(self: DatumEither<E, A>, p: Refinement<A, B>): self is DatumEither<E, B>;
|
50
|
+
export declare function exists<E, A>(self: DatumEither<E, A>, p: Predicate<A>): boolean;
|
51
|
+
/**
|
52
|
+
* @tsplus fluent fncts.DatumEither filter
|
53
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
54
|
+
*/
|
55
|
+
export declare function filter<E, A, B extends A>(self: DatumEither<E, A>, p: Refinement<A, B>): DatumEither<E, B>;
|
56
|
+
export declare function filter<E, A>(self: DatumEither<E, A>, p: Predicate<A>): DatumEither<E, A>;
|
57
|
+
/**
|
58
|
+
* @tsplus fluent fncts.DatumEither filterMap
|
59
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
60
|
+
*/
|
61
|
+
export declare function filterMap<E, A, B>(self: DatumEither<E, A>, f: (a: A) => Maybe<B>): DatumEither<E, B>;
|
62
|
+
/**
|
63
|
+
* @tsplus fluent fncts.DatumEither flatMap
|
64
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
65
|
+
*/
|
66
|
+
export declare const flatMap: <E, A, E1, B>(self: DatumEither<E, A>, f: (a: A) => DatumEither<E1, B>) => DatumEither<E | E1, B>;
|
67
|
+
/**
|
68
|
+
* @tsplus fluent fncts.DatumEither foldLeft
|
69
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
70
|
+
*/
|
71
|
+
export declare function foldLeft<E, A, B>(self: DatumEither<E, A>, b: B, f: (b: B, a: A) => B): B;
|
72
|
+
/**
|
73
|
+
* @tsplus fluent fncts.DatumEither foldMap
|
74
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
75
|
+
*/
|
76
|
+
export declare function foldMap<E, A, M>(self: DatumEither<E, A>, f: (a: A) => M, /** @tsplus auto */ M: P.Monoid<M>): M;
|
77
|
+
/**
|
78
|
+
* @tsplus fluent fncts.DatumEither foldRight
|
79
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
80
|
+
*/
|
81
|
+
export declare function foldRight<E, A, B>(self: DatumEither<E, A>, b: B, f: (a: A, b: B) => B): B;
|
82
|
+
/**
|
83
|
+
* @tsplus fluent fncts.DatumEither getOrElse
|
84
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
85
|
+
*/
|
86
|
+
export declare function getOrElse<E, A, B, C>(self: DatumEither<E, A>, onEmpty: () => B, onLeft: (e: E) => C): A | B | C;
|
87
|
+
/**
|
88
|
+
* @tsplus fluent fncts.DatumEither map
|
89
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
90
|
+
*/
|
91
|
+
export declare const map: <E, A, B>(self: DatumEither<E, A>, f: (a: A) => B) => DatumEither<E, B>;
|
92
|
+
/**
|
93
|
+
* @tsplus fluent fncts.DatumEither mapLeft
|
94
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
95
|
+
*/
|
96
|
+
export declare const mapLeft: <E, A, E1>(self: DatumEither<E, A>, f: (e: E) => E1) => DatumEither<E1, A>;
|
97
|
+
/**
|
98
|
+
* @tsplus fluent fncts.DatumEither match
|
99
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
100
|
+
*/
|
101
|
+
export declare function match<E, A, B, C, D, F>(self: DatumEither<E, A>, onInitial: () => B, onPending: () => C, onLeft: (e: E, isLoading: boolean) => D, onRight: (a: A, isLoading: boolean) => F): B | C | D | F;
|
102
|
+
/**
|
103
|
+
* @tsplus fluent fncts.DatumEither match3
|
104
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
105
|
+
*/
|
106
|
+
export declare function match3<E, A, B, C, D>(self: DatumEither<E, A>, onEmpty: (loading: boolean) => B, onLeft: (e: E, loading: boolean) => C, onRight: (a: A, loading: boolean) => D): B | C | D;
|
107
|
+
/**
|
108
|
+
* @tsplus fluent fncts.DatumEither matchAll
|
109
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
110
|
+
*/
|
111
|
+
export declare function matchAll<E, A, B, C, D, F, G, H>(self: DatumEither<E, A>, cases: {
|
112
|
+
Initial: () => B;
|
113
|
+
Pending: () => C;
|
114
|
+
RefreshLeft: (e: E) => D;
|
115
|
+
RefreshRight: (a: A) => F;
|
116
|
+
RepleteLeft: (e: E) => G;
|
117
|
+
RepleteRight: (a: A) => H;
|
118
|
+
}): B | C | D | F | G | H;
|
119
|
+
/**
|
120
|
+
* @tsplus fluent fncts.DatumEither matchEither
|
121
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
122
|
+
*/
|
123
|
+
export declare const matchEither: <E, A, B, C, D, F>(self: DatumEither<E, A>, cases: {
|
124
|
+
Initial: () => B;
|
125
|
+
Pending: () => C;
|
126
|
+
Refresh: (value: Either<E, A>) => D;
|
127
|
+
Replete: (value: Either<E, A>) => F;
|
128
|
+
}) => B | C | D | F;
|
129
|
+
/**
|
130
|
+
* @tsplus fluent fncts.DatumEither orElse
|
131
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
132
|
+
*/
|
133
|
+
export declare const orElse: <E, A, E1, B>(self: DatumEither<E, A>, that: Lazy<DatumEither<E1, B>>) => DatumEither<E | E1, A | B>;
|
134
|
+
/**
|
135
|
+
* @tsplus fluent fncts.DatumEither partition
|
136
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
137
|
+
*/
|
138
|
+
export declare function partition<E, A, B extends A>(self: DatumEither<E, A>, p: Refinement<A, B>): [DatumEither<E, A>, DatumEither<E, B>];
|
139
|
+
export declare function partition<E, A>(self: DatumEither<E, A>, p: Predicate<A>): [DatumEither<E, A>, DatumEither<E, A>];
|
140
|
+
/**
|
141
|
+
* @tsplus fluent fncts.DatumEither partitionMap
|
142
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
143
|
+
*/
|
144
|
+
export declare function partitionMap<E, A, B, C>(self: DatumEither<E, A>, f: (a: A) => Either<B, C>): [DatumEither<E, B>, DatumEither<E, C>];
|
145
|
+
/**
|
146
|
+
* @tsplus getter fncts.DatumEither toPending
|
147
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
148
|
+
*/
|
149
|
+
export declare const toPending: <E, A>(self: DatumEither<E, A>) => DatumEither<E, A>;
|
150
|
+
/**
|
151
|
+
* @tsplus getter fncts.DatumEither toReplete
|
152
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
153
|
+
*/
|
154
|
+
export declare const toReplete: <E, A>(self: DatumEither<E, A>) => DatumEither<E, A>;
|
155
|
+
/**
|
156
|
+
* @tsplus fluent fncts.DatumEither traverse
|
157
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
158
|
+
*/
|
159
|
+
export declare const traverse: P.Traversable<DatumEitherF>["traverse"];
|
160
|
+
/**
|
161
|
+
* @tsplus fluent fncts.DatumEither zipWith
|
162
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
163
|
+
*/
|
164
|
+
export declare const zipWith: <E, A, E1, B, C>(self: DatumEither<E, A>, that: DatumEither<E1, B>, f: (a: A, b: B) => C) => DatumEither<E | E1, C>;
|
165
|
+
/**
|
166
|
+
* @tsplus fluent fncts.DatumEither zip
|
167
|
+
* @tsplus location "@fncts/base/data/DatumEither/api"
|
168
|
+
*/
|
169
|
+
export declare function zip<E, A, E1, B>(self: DatumEither<E, A>, that: DatumEither<E1, B>): DatumEither<E | E1, Zipped.Make<A, B>>;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { HKT } from "@fncts/typelevel/HKT";
|
2
|
+
import { Datum } from "@fncts/base/data/Datum/definition";
|
3
|
+
import { Either } from "@fncts/base/data/Either/definition";
|
4
|
+
export interface DatumEitherF extends HKT {
|
5
|
+
type: DatumEither<this["E"], this["A"]>;
|
6
|
+
variance: {
|
7
|
+
E: "+";
|
8
|
+
A: "+";
|
9
|
+
};
|
10
|
+
}
|
11
|
+
/**
|
12
|
+
* @tsplus type fncts.DatumEither
|
13
|
+
* @tsplus no-inherit fncts.Datum
|
14
|
+
*/
|
15
|
+
export declare type DatumEither<E, A> = Datum<Either<E, A>>;
|
16
|
+
/**
|
17
|
+
* @tsplus type fncts.DatumEitherOps
|
18
|
+
*/
|
19
|
+
export interface DatumEitherOps {
|
20
|
+
}
|
21
|
+
export declare const DatumEither: DatumEitherOps;
|
@@ -139,3 +139,9 @@ export declare class UnionError extends DecodeError {
|
|
139
139
|
constructor(label: string, errors: Vector<DecodeError>);
|
140
140
|
render: import("../../control/Eval").Eval<import("../../collection/immutable/RoseTree").RoseTree<string>>;
|
141
141
|
}
|
142
|
+
export declare class EmptyError extends DecodeError {
|
143
|
+
readonly actual: unknown;
|
144
|
+
readonly _tag = "EmptyError";
|
145
|
+
constructor(actual: unknown);
|
146
|
+
render: import("../../control/Eval").Eval<import("../../collection/immutable/RoseTree").RoseTree<string>>;
|
147
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/data/DecodeError.d.ts
CHANGED
@@ -3,7 +3,11 @@ import { These } from "@fncts/base/data/These";
|
|
3
3
|
import type { DecodeError } from "@fncts/base/data/DecodeError";
|
4
4
|
export declare const DecoderTypeId: unique symbol;
|
5
5
|
export declare type DecoderTypeId = typeof DecoderTypeId;
|
6
|
-
export interface DecoderF extends
|
6
|
+
export interface DecoderF extends HKT {
|
7
|
+
type: Decoder<this["A"]>;
|
8
|
+
variance: {
|
9
|
+
A: "+";
|
10
|
+
};
|
7
11
|
}
|
8
12
|
/**
|
9
13
|
* @tsplus type fncts.Decoder
|
@@ -13,9 +17,7 @@ export declare class Decoder<A> {
|
|
13
17
|
readonly decode: (input: unknown) => These<DecodeError, A>;
|
14
18
|
readonly label: string;
|
15
19
|
readonly _typeId: DecoderTypeId;
|
16
|
-
readonly
|
17
|
-
readonly [HKT.A]: () => A;
|
18
|
-
readonly [HKT.T]: Decoder<HKT._A<this>>;
|
20
|
+
readonly _A: () => A;
|
19
21
|
constructor(decode: (input: unknown) => These<DecodeError, A>, label: string);
|
20
22
|
}
|
21
23
|
/**
|
package/data/Either/api.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Either } from "@fncts/base/data/Either/definition";
|
2
2
|
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
3
3
|
import { Lazy } from "@fncts/base/data/function/definition";
|
4
|
+
import { Zipped } from "@fncts/base/data/Zipped";
|
4
5
|
import { Predicate } from "@fncts/base/data/Predicate/definition";
|
5
6
|
import type * as P from "../../typeclass.js";
|
6
7
|
import type { EitherF } from "./definition.js";
|
@@ -118,7 +119,16 @@ export declare function swap<E, A>(self: Either<E, A>): Either<A, E>;
|
|
118
119
|
* @tsplus location "@fncts/base/data/Either/api"
|
119
120
|
*/
|
120
121
|
export declare const traverse_: P.Traversable<EitherF>["traverse"];
|
122
|
+
/**
|
123
|
+
* @tsplus fluent fncts.Either zipWith
|
124
|
+
* @tsplus location "@fncts/base/data/Either/api"
|
125
|
+
*/
|
121
126
|
export declare function zipWith_<E1, A, E2, B, C>(self: Either<E1, A>, fb: Either<E2, B>, f: (a: A, b: B) => C): Either<E1 | E2, C>;
|
127
|
+
/**
|
128
|
+
* @tsplus fluent fncts.Either zip
|
129
|
+
* @tsplus location "@fncts/base/data/Either/api"
|
130
|
+
*/
|
131
|
+
export declare function zip<E, A, E1, B>(self: Either<E, A>, that: Either<E1, B>): Either<E | E1, Zipped.Make<A, B>>;
|
122
132
|
/**
|
123
133
|
* @tsplus fluent fncts.Either filterMap
|
124
134
|
* @tsplus location "@fncts/base/data/Either/api"
|
@@ -5,9 +5,12 @@ export declare const enum EitherTag {
|
|
5
5
|
}
|
6
6
|
export declare const EitherTypeId: unique symbol;
|
7
7
|
export declare type EitherTypeId = typeof EitherTypeId;
|
8
|
-
export interface EitherF extends
|
9
|
-
|
10
|
-
|
8
|
+
export interface EitherF extends HKT {
|
9
|
+
type: Either<this["E"], this["A"]>;
|
10
|
+
variance: {
|
11
|
+
E: "+";
|
12
|
+
A: "+";
|
13
|
+
};
|
11
14
|
}
|
12
15
|
/**
|
13
16
|
* @tsplus type fncts.Either
|
@@ -15,17 +18,8 @@ export interface Either1F<E> extends Either1<E, any> {
|
|
15
18
|
*/
|
16
19
|
export declare class Either<E, A> {
|
17
20
|
readonly _typeId: EitherTypeId;
|
18
|
-
readonly
|
19
|
-
readonly
|
20
|
-
readonly [HKT.A]: () => A;
|
21
|
-
readonly [HKT.T]: Either<HKT._E<this>, HKT._A<this>>;
|
22
|
-
}
|
23
|
-
export interface Either1<E, A> {
|
24
|
-
readonly _typeId: EitherTypeId;
|
25
|
-
readonly [HKT.F]: EitherF;
|
26
|
-
readonly [HKT.E]: () => E;
|
27
|
-
readonly [HKT.A]: () => A;
|
28
|
-
readonly [HKT.T]: Either<E, HKT._A<this>>;
|
21
|
+
readonly _E: () => E;
|
22
|
+
readonly _A: () => A;
|
29
23
|
}
|
30
24
|
/**
|
31
25
|
* @tsplus type fncts.Either.Left
|