@fncts/base 0.0.1 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_cjs/collection/Iterable/api/traverseConc.cjs +21 -15
- package/_cjs/collection/Iterable/api/traverseConc.cjs.map +1 -1
- package/_cjs/collection/Iterable/api.cjs +23 -37
- package/_cjs/collection/Iterable/api.cjs.map +1 -1
- package/_cjs/collection/Iterable.cjs +3 -3
- package/_cjs/collection/compat/Array/api.cjs +1 -1
- package/_cjs/collection/compat/Array/api.cjs.map +1 -1
- package/_cjs/collection/compat/Array.cjs +2 -2
- package/_cjs/collection/immutable/Conc/api.cjs +41 -53
- package/_cjs/collection/immutable/Conc/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc/constructors.cjs +1 -1
- package/_cjs/collection/immutable/Conc/definition.cjs +49 -39
- package/_cjs/collection/immutable/Conc/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Conc.cjs +6 -6
- package/_cjs/collection/immutable/Dictionary/definition.cjs +4 -2
- package/_cjs/collection/immutable/Dictionary/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/api.cjs +35 -108
- package/_cjs/collection/immutable/HashMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap/definition.cjs +19 -15
- package/_cjs/collection/immutable/HashMap/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/HashMap.cjs +2 -2
- package/_cjs/collection/immutable/HashSet/api.cjs +10 -10
- package/_cjs/collection/immutable/HashSet/api.cjs.map +1 -1
- package/_cjs/collection/immutable/HashSet.cjs +2 -2
- package/_cjs/collection/immutable/ImmutableArray/api.cjs +153 -248
- package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs +12 -10
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs +153 -157
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray.cjs +4 -4
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs +118 -181
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs +3 -0
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs +45 -81
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray.cjs +5 -5
- package/_cjs/collection/immutable/List/api.cjs +4 -7
- package/_cjs/collection/immutable/List/api.cjs.map +1 -1
- package/_cjs/collection/immutable/List/constructors.cjs +1 -1
- package/_cjs/collection/immutable/List.cjs +5 -5
- package/_cjs/collection/immutable/Queue.cjs +4 -4
- package/_cjs/collection/immutable/RoseTree/api.cjs +485 -0
- package/_cjs/collection/immutable/RoseTree/api.cjs.map +1 -0
- package/_cjs/collection/immutable/RoseTree/definition.cjs +58 -0
- package/_cjs/collection/immutable/RoseTree/definition.cjs.map +1 -0
- package/_cjs/collection/immutable/RoseTree.cjs +32 -0
- package/_cjs/collection/immutable/RoseTree.cjs.map +1 -0
- package/_cjs/collection/immutable/SortedMap/api.cjs +65 -65
- package/_cjs/collection/immutable/SortedMap/api.cjs.map +1 -1
- package/_cjs/collection/immutable/SortedMap.cjs +5 -5
- package/_cjs/collection/immutable/Vector/api.cjs +70 -15
- package/_cjs/collection/immutable/Vector/api.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector/definition.cjs +13 -11
- package/_cjs/collection/immutable/Vector/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/Vector.cjs +2 -2
- package/_cjs/collection/mutable/HashMap.cjs +5 -5
- package/_cjs/collection/mutable/HashMap.cjs.map +1 -1
- package/_cjs/collection/mutable/HashSet.cjs +4 -4
- package/_cjs/collection/mutable/HashSet.cjs.map +1 -1
- package/_cjs/control/Eval/api.cjs +7 -1
- package/_cjs/control/Eval/api.cjs.map +1 -1
- package/_cjs/control/Eval/definition.cjs +7 -0
- package/_cjs/control/Eval/definition.cjs.map +1 -1
- package/_cjs/control/Eval/instance.cjs +14 -25
- package/_cjs/control/Eval/instance.cjs.map +1 -1
- package/_cjs/control/Eval.cjs +5 -5
- package/_cjs/control/Z/api.cjs +2 -2
- package/_cjs/control/Z/definition.cjs +10 -4
- package/_cjs/control/Z/definition.cjs.map +1 -1
- package/_cjs/control/Z/instances.cjs +7 -14
- package/_cjs/control/Z/instances.cjs.map +1 -1
- package/_cjs/control/Z/runtime.cjs +2 -2
- package/_cjs/control/Z.cjs +4 -4
- package/_cjs/data/Branded/definition.cjs +29 -0
- package/_cjs/data/Branded/definition.cjs.map +1 -0
- package/_cjs/data/Branded/derivations.cjs +58 -0
- package/_cjs/data/Branded/derivations.cjs.map +1 -0
- package/_cjs/data/Branded.cjs +32 -0
- package/_cjs/data/Branded.cjs.map +1 -0
- package/_cjs/data/Cause/api/fold.cjs +2 -0
- package/_cjs/data/Cause/api/fold.cjs.map +1 -1
- package/_cjs/data/Cause/api/unified.cjs +2 -2
- package/_cjs/data/Cause/api.cjs +30 -7
- package/_cjs/data/Cause/api.cjs.map +1 -1
- package/_cjs/data/Cause/definition.cjs +3 -3
- package/_cjs/data/Cause.cjs +2 -2
- package/_cjs/data/Const/api.cjs +3 -7
- package/_cjs/data/Const/api.cjs.map +1 -1
- package/_cjs/data/Const/definition.cjs +19 -1
- package/_cjs/data/Const/definition.cjs.map +1 -1
- package/_cjs/data/Const/instances.cjs +9 -20
- package/_cjs/data/Const/instances.cjs.map +1 -1
- package/_cjs/data/Const.cjs +3 -3
- package/_cjs/data/DecodeError/definition.cjs +308 -0
- package/_cjs/data/DecodeError/definition.cjs.map +1 -0
- package/_cjs/data/DecodeError.cjs +19 -0
- package/_cjs/data/DecodeError.cjs.map +1 -0
- package/_cjs/data/Decoder/api.cjs +217 -0
- package/_cjs/data/Decoder/api.cjs.map +1 -0
- package/_cjs/data/Decoder/definition.cjs +41 -0
- package/_cjs/data/Decoder/definition.cjs.map +1 -0
- package/_cjs/data/Decoder.cjs +32 -0
- package/_cjs/data/Decoder.cjs.map +1 -0
- package/_cjs/data/Duration/api.cjs +22 -9
- package/_cjs/data/Duration/api.cjs.map +1 -1
- package/_cjs/data/Duration/definition.cjs +1 -1
- package/_cjs/data/Duration.cjs +2 -2
- package/_cjs/data/Either/api/align.cjs +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 +110 -47
- package/_cjs/data/Either/api.cjs.map +1 -1
- package/_cjs/data/Either/constructors.cjs +1 -1
- package/_cjs/data/Either/definition.cjs +39 -10
- package/_cjs/data/Either/definition.cjs.map +1 -1
- package/_cjs/data/Either/destructors.cjs +2 -0
- package/_cjs/data/Either/destructors.cjs.map +1 -1
- package/_cjs/data/Either/instances.cjs +123 -40
- package/_cjs/data/Either/instances.cjs.map +1 -1
- package/_cjs/data/Either.cjs +5 -5
- package/_cjs/data/Environment/api.cjs +29 -8
- package/_cjs/data/Environment/api.cjs.map +1 -1
- package/_cjs/data/Environment.cjs +2 -2
- package/_cjs/data/Exit/api.cjs +1 -1
- package/_cjs/data/Exit/constructors.cjs +1 -1
- package/_cjs/data/Exit/definition.cjs +2 -2
- package/_cjs/data/Exit.cjs +3 -3
- package/_cjs/data/FiberId/api.cjs +1 -1
- package/_cjs/data/FiberId/constructors.cjs +2 -2
- package/_cjs/data/FiberId/definition.cjs +1 -1
- package/_cjs/data/FiberId.cjs +3 -3
- package/_cjs/data/Identity/api.cjs +35 -6
- package/_cjs/data/Identity/api.cjs.map +1 -1
- package/_cjs/data/Identity/definition.cjs +10 -1
- package/_cjs/data/Identity/definition.cjs.map +1 -1
- package/_cjs/data/Identity/instances.cjs +12 -26
- package/_cjs/data/Identity/instances.cjs.map +1 -1
- package/_cjs/data/Identity.cjs +3 -3
- package/_cjs/data/Interval.cjs +154 -0
- package/_cjs/data/Interval.cjs.map +1 -0
- package/_cjs/data/Maybe/api.cjs +31 -44
- package/_cjs/data/Maybe/api.cjs.map +1 -1
- package/_cjs/data/Maybe/definition.cjs +46 -19
- package/_cjs/data/Maybe/definition.cjs.map +1 -1
- package/_cjs/data/Maybe/destructors.cjs +1 -0
- package/_cjs/data/Maybe/destructors.cjs.map +1 -1
- package/_cjs/data/Maybe/instances.cjs +62 -42
- package/_cjs/data/Maybe/instances.cjs.map +1 -1
- package/_cjs/data/Maybe.cjs +5 -5
- package/_cjs/data/Newtype.cjs +5 -3
- package/_cjs/data/Newtype.cjs.map +1 -1
- package/_cjs/data/Patch/api.cjs +1 -1
- package/_cjs/data/Patch/api.cjs.map +1 -1
- package/_cjs/data/Patch.cjs +2 -2
- package/_cjs/data/Predicate.cjs +2 -2
- package/_cjs/data/Refinement/api.cjs +0 -4
- package/_cjs/data/Refinement/api.cjs.map +1 -1
- package/_cjs/data/Refinement.cjs +2 -2
- package/_cjs/data/Struct/api.cjs +1 -1
- package/_cjs/data/Struct/definition.cjs +4 -2
- package/_cjs/data/Struct/definition.cjs.map +1 -1
- package/_cjs/data/Tag.cjs +2 -2
- package/_cjs/data/These/api.cjs +299 -0
- package/_cjs/data/These/api.cjs.map +1 -0
- package/_cjs/data/These/constructors.cjs +25 -5
- package/_cjs/data/These/constructors.cjs.map +1 -1
- package/_cjs/data/These/definition.cjs +16 -0
- package/_cjs/data/These/definition.cjs.map +1 -1
- package/_cjs/data/These/destructors.cjs +70 -0
- package/_cjs/data/These/destructors.cjs.map +1 -1
- package/_cjs/data/These/instances.cjs +54 -0
- package/_cjs/data/These/instances.cjs.map +1 -0
- package/_cjs/data/These.cjs +16 -3
- package/_cjs/data/These.cjs.map +1 -1
- package/_cjs/data/Trace.cjs +3 -3
- package/_cjs/data/TraceElement.cjs +1 -1
- package/_cjs/data/bigint/definition.cjs +6 -0
- package/_cjs/data/bigint/definition.cjs.map +1 -0
- package/_cjs/data/bigint/instances.cjs +24 -0
- package/_cjs/data/bigint/instances.cjs.map +1 -0
- package/_cjs/data/bigint.cjs +32 -0
- package/_cjs/data/bigint.cjs.map +1 -0
- package/_cjs/data/boolean/definition.cjs +6 -0
- package/_cjs/data/boolean/definition.cjs.map +1 -0
- package/_cjs/data/boolean/instances.cjs +24 -0
- package/_cjs/data/boolean/instances.cjs.map +1 -0
- package/_cjs/data/boolean.cjs +32 -0
- package/_cjs/data/boolean.cjs.map +1 -0
- package/_cjs/data/exceptions/InterruptedException.cjs +1 -1
- package/_cjs/data/exceptions.cjs +7 -7
- package/_cjs/data/function.cjs +3 -3
- package/_cjs/data/number/instances.cjs +19 -6
- package/_cjs/data/number/instances.cjs.map +1 -1
- package/_cjs/data/number.cjs +3 -3
- package/_cjs/data/object/instances.cjs +24 -0
- package/_cjs/data/object/instances.cjs.map +1 -0
- package/_cjs/data/object.cjs +1 -1
- package/_cjs/data/string/instances.cjs +25 -10
- package/_cjs/data/string/instances.cjs.map +1 -1
- package/_cjs/data/string.cjs +3 -3
- package/_cjs/internal/AtomicBoolean.cjs +1 -1
- package/_cjs/internal/AtomicNumber.cjs +1 -1
- package/_cjs/internal/Stack.cjs +4 -0
- package/_cjs/internal/Stack.cjs.map +1 -1
- package/_cjs/json/EitherJson.cjs +33 -0
- package/_cjs/json/EitherJson.cjs.map +1 -0
- package/_cjs/json/MaybeJson.cjs +31 -0
- package/_cjs/json/MaybeJson.cjs.map +1 -0
- package/_cjs/json/TheseJson.cjs +37 -0
- package/_cjs/json/TheseJson.cjs.map +1 -0
- package/_cjs/optics/At.cjs +2 -2
- package/_cjs/optics/Fold.cjs +1 -1
- package/_cjs/optics/Getter.cjs +1 -1
- package/_cjs/optics/Index.cjs +2 -2
- package/_cjs/optics/Iso.cjs +2 -2
- package/_cjs/optics/Lens.cjs +2 -2
- package/_cjs/optics/Optional/definition.cjs +6 -4
- package/_cjs/optics/Optional/definition.cjs.map +1 -1
- package/_cjs/optics/Optional.cjs +2 -2
- package/_cjs/optics/Prism.cjs +4 -4
- package/_cjs/optics/Setter.cjs +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 +4 -4
- package/_cjs/optics/Traversal/api/fromTraversable.cjs.map +1 -1
- package/_cjs/optics/Traversal/definition.cjs +17 -12
- package/_cjs/optics/Traversal/definition.cjs.map +1 -1
- package/_cjs/optics/Traversal.cjs +3 -3
- package/_cjs/typeclass/Align.cjs +0 -20
- package/_cjs/typeclass/Align.cjs.map +1 -1
- package/_cjs/typeclass/Alt.cjs +5 -15
- package/_cjs/typeclass/Alt.cjs.map +1 -1
- package/_cjs/typeclass/Alternative.cjs +0 -23
- package/_cjs/typeclass/Alternative.cjs.map +1 -1
- package/_cjs/typeclass/Applicative.cjs +0 -22
- package/_cjs/typeclass/Applicative.cjs.map +1 -1
- package/_cjs/typeclass/ApplicativeExcept.cjs +40 -34
- package/_cjs/typeclass/ApplicativeExcept.cjs.map +1 -1
- package/_cjs/typeclass/Apply.cjs +93 -49
- package/_cjs/typeclass/Apply.cjs.map +1 -1
- package/_cjs/typeclass/Chain.cjs +40 -17
- package/_cjs/typeclass/Chain.cjs.map +1 -1
- package/_cjs/typeclass/Closure.cjs +1 -4
- package/_cjs/typeclass/Closure.cjs.map +1 -1
- package/_cjs/typeclass/Eq/definition.cjs +18 -0
- package/_cjs/typeclass/Eq/definition.cjs.map +1 -0
- package/_cjs/typeclass/Eq/derivations.cjs +59 -0
- package/_cjs/typeclass/Eq/derivations.cjs.map +1 -0
- package/_cjs/typeclass/Eq.cjs +11 -13
- package/_cjs/typeclass/Eq.cjs.map +1 -1
- package/_cjs/typeclass/Equatable.cjs +3 -3
- package/_cjs/typeclass/Fail.cjs +6 -12
- package/_cjs/typeclass/Fail.cjs.map +1 -1
- package/_cjs/typeclass/Filterable.cjs +31 -18
- package/_cjs/typeclass/Filterable.cjs.map +1 -1
- package/_cjs/typeclass/FilterableWithIndex.cjs +0 -26
- package/_cjs/typeclass/FilterableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Foldable.cjs +33 -19
- package/_cjs/typeclass/Foldable.cjs.map +1 -1
- package/_cjs/typeclass/FoldableWithIndex.cjs +33 -21
- package/_cjs/typeclass/FoldableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Functor.cjs +19 -16
- package/_cjs/typeclass/Functor.cjs.map +1 -1
- package/_cjs/typeclass/FunctorWithIndex.cjs +0 -21
- package/_cjs/typeclass/FunctorWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Guard/api.cjs +40 -0
- package/_cjs/typeclass/Guard/api.cjs.map +1 -0
- package/_cjs/typeclass/Guard/definition.cjs +40 -0
- package/_cjs/typeclass/Guard/definition.cjs.map +1 -0
- package/_cjs/typeclass/Guard/derivations.cjs +85 -0
- package/_cjs/typeclass/Guard/derivations.cjs.map +1 -0
- package/_cjs/typeclass/Guard.cjs +32 -0
- package/_cjs/typeclass/Guard.cjs.map +1 -0
- package/_cjs/typeclass/HashEq.cjs +3 -3
- package/_cjs/typeclass/HashEq.cjs.map +1 -1
- package/_cjs/typeclass/Hashable.cjs +2 -2
- package/_cjs/typeclass/Monad.cjs +0 -22
- package/_cjs/typeclass/Monad.cjs.map +1 -1
- package/_cjs/typeclass/MonadExcept.cjs +12 -19
- package/_cjs/typeclass/MonadExcept.cjs.map +1 -1
- package/_cjs/typeclass/Monoid.cjs +56 -2
- package/_cjs/typeclass/Monoid.cjs.map +1 -1
- package/_cjs/typeclass/Nil.cjs +10 -0
- package/_cjs/typeclass/Nil.cjs.map +1 -1
- package/_cjs/typeclass/Ord/api/contramap.cjs +2 -4
- package/_cjs/typeclass/Ord/api/contramap.cjs.map +1 -1
- package/_cjs/typeclass/Ord/api/max.cjs +1 -1
- package/_cjs/typeclass/Ord/api/max.cjs.map +1 -1
- package/_cjs/typeclass/Ord/api/min.cjs +1 -1
- package/_cjs/typeclass/Ord/api/min.cjs.map +1 -1
- package/_cjs/typeclass/Ord/api.cjs +3 -3
- package/_cjs/typeclass/Ord/definition.cjs +2 -3
- package/_cjs/typeclass/Ord/definition.cjs.map +1 -1
- package/_cjs/typeclass/Ord/instances.cjs +7 -7
- package/_cjs/typeclass/Ord/instances.cjs.map +1 -1
- package/_cjs/typeclass/Ord.cjs +3 -3
- package/_cjs/typeclass/Pointed.cjs +6 -11
- package/_cjs/typeclass/Pointed.cjs.map +1 -1
- package/_cjs/typeclass/Semialign.cjs +77 -94
- package/_cjs/typeclass/Semialign.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/api.cjs +2 -2
- package/_cjs/typeclass/Semigroup/api.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/definition.cjs.map +1 -1
- package/_cjs/typeclass/Semigroup/derivations.cjs +63 -0
- package/_cjs/typeclass/Semigroup/derivations.cjs.map +1 -0
- package/_cjs/typeclass/Semigroup.cjs +2 -2
- package/_cjs/typeclass/Semimonoidal.cjs +9 -13
- package/_cjs/typeclass/Semimonoidal.cjs.map +1 -1
- package/_cjs/typeclass/Showable/show.cjs +11 -11
- package/_cjs/typeclass/Showable/show.cjs.map +1 -1
- package/_cjs/typeclass/Showable.cjs +2 -2
- package/_cjs/typeclass/Traversable.cjs +26 -34
- package/_cjs/typeclass/Traversable.cjs.map +1 -1
- package/_cjs/typeclass/TraversableWithIndex.cjs +7 -38
- package/_cjs/typeclass/TraversableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/Witherable.cjs +41 -42
- package/_cjs/typeclass/Witherable.cjs.map +1 -1
- package/_cjs/typeclass/WitherableWithIndex.cjs +41 -50
- package/_cjs/typeclass/WitherableWithIndex.cjs.map +1 -1
- package/_cjs/typeclass/builtin.cjs +1 -1
- package/_cjs/typeclass.cjs +49 -36
- package/_cjs/typeclass.cjs.map +1 -1
- package/_cjs/types.cjs +3 -3
- package/_cjs/util/predicates.cjs +5 -0
- package/_cjs/util/predicates.cjs.map +1 -1
- package/_mjs/collection/Iterable/api/traverseConc.mjs +20 -15
- package/_mjs/collection/Iterable/api/traverseConc.mjs.map +1 -1
- package/_mjs/collection/Iterable/api.mjs +21 -31
- package/_mjs/collection/Iterable/api.mjs.map +1 -1
- package/_mjs/collection/compat/Array/api.mjs +1 -1
- package/_mjs/collection/compat/Array/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/api.mjs +35 -36
- package/_mjs/collection/immutable/Conc/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Conc/definition.mjs +48 -39
- package/_mjs/collection/immutable/Conc/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/Dictionary/definition.mjs +3 -2
- package/_mjs/collection/immutable/Dictionary/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/api.mjs +26 -66
- package/_mjs/collection/immutable/HashMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/HashMap/definition.mjs +18 -15
- package/_mjs/collection/immutable/HashMap/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/HashSet/api.mjs +5 -5
- package/_mjs/collection/immutable/HashSet/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/api.mjs +135 -177
- package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs +11 -10
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs +151 -138
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +108 -142
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs +2 -0
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs +46 -67
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/List/api.mjs +4 -5
- package/_mjs/collection/immutable/List/api.mjs.map +1 -1
- package/_mjs/collection/immutable/RoseTree/api.mjs +447 -0
- package/_mjs/collection/immutable/RoseTree/api.mjs.map +1 -0
- package/_mjs/collection/immutable/RoseTree/definition.mjs +35 -0
- package/_mjs/collection/immutable/RoseTree/definition.mjs.map +1 -0
- package/_mjs/collection/immutable/RoseTree.mjs +4 -0
- package/_mjs/collection/immutable/RoseTree.mjs.map +1 -0
- package/_mjs/collection/immutable/SortedMap/api.mjs +65 -65
- package/_mjs/collection/immutable/SortedMap/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/api.mjs +59 -15
- package/_mjs/collection/immutable/Vector/api.mjs.map +1 -1
- package/_mjs/collection/immutable/Vector/definition.mjs +12 -11
- package/_mjs/collection/immutable/Vector/definition.mjs.map +1 -1
- package/_mjs/collection/mutable/HashMap.mjs +5 -5
- package/_mjs/collection/mutable/HashMap.mjs.map +1 -1
- package/_mjs/collection/mutable/HashSet.mjs +4 -4
- package/_mjs/collection/mutable/HashSet.mjs.map +1 -1
- package/_mjs/control/Eval/api.mjs +5 -2
- package/_mjs/control/Eval/api.mjs.map +1 -1
- package/_mjs/control/Eval/definition.mjs +1 -0
- package/_mjs/control/Eval/definition.mjs.map +1 -1
- package/_mjs/control/Eval/instance.mjs +15 -18
- package/_mjs/control/Eval/instance.mjs.map +1 -1
- package/_mjs/control/Z/definition.mjs +2 -0
- package/_mjs/control/Z/definition.mjs.map +1 -1
- package/_mjs/control/Z/instances.mjs +7 -8
- package/_mjs/control/Z/instances.mjs.map +1 -1
- package/_mjs/data/Branded/definition.mjs +18 -0
- package/_mjs/data/Branded/definition.mjs.map +1 -0
- package/_mjs/data/Branded/derivations.mjs +39 -0
- package/_mjs/data/Branded/derivations.mjs.map +1 -0
- package/_mjs/data/Branded.mjs +4 -0
- package/_mjs/data/Branded.mjs.map +1 -0
- package/_mjs/data/Cause/api/fold.mjs +2 -0
- package/_mjs/data/Cause/api/fold.mjs.map +1 -1
- package/_mjs/data/Cause/api.mjs +20 -0
- package/_mjs/data/Cause/api.mjs.map +1 -1
- package/_mjs/data/Const/api.mjs +3 -3
- package/_mjs/data/Const/api.mjs.map +1 -1
- package/_mjs/data/Const/definition.mjs +13 -1
- package/_mjs/data/Const/definition.mjs.map +1 -1
- package/_mjs/data/Const/instances.mjs +7 -15
- package/_mjs/data/Const/instances.mjs.map +1 -1
- package/_mjs/data/DecodeError/definition.mjs +226 -0
- package/_mjs/data/DecodeError/definition.mjs.map +1 -0
- package/_mjs/data/DecodeError.mjs +3 -0
- package/_mjs/data/DecodeError.mjs.map +1 -0
- package/_mjs/data/Decoder/api.mjs +179 -0
- package/_mjs/data/Decoder/api.mjs.map +1 -0
- package/_mjs/data/Decoder/definition.mjs +24 -0
- package/_mjs/data/Decoder/definition.mjs.map +1 -0
- package/_mjs/data/Decoder.mjs +4 -0
- package/_mjs/data/Decoder.mjs.map +1 -0
- package/_mjs/data/Duration/api.mjs +17 -8
- package/_mjs/data/Duration/api.mjs.map +1 -1
- package/_mjs/data/Either/api/alignWith.mjs +2 -0
- package/_mjs/data/Either/api/alignWith.mjs.map +1 -1
- package/_mjs/data/Either/api.mjs +91 -21
- package/_mjs/data/Either/api.mjs.map +1 -1
- package/_mjs/data/Either/definition.mjs +25 -5
- package/_mjs/data/Either/definition.mjs.map +1 -1
- package/_mjs/data/Either/destructors.mjs +2 -0
- package/_mjs/data/Either/destructors.mjs.map +1 -1
- package/_mjs/data/Either/instances.mjs +109 -39
- package/_mjs/data/Either/instances.mjs.map +1 -1
- package/_mjs/data/Environment/api.mjs +23 -7
- package/_mjs/data/Environment/api.mjs.map +1 -1
- package/_mjs/data/Identity/api.mjs +24 -5
- package/_mjs/data/Identity/api.mjs.map +1 -1
- package/_mjs/data/Identity/definition.mjs +3 -1
- package/_mjs/data/Identity/definition.mjs.map +1 -1
- package/_mjs/data/Identity/instances.mjs +12 -18
- package/_mjs/data/Identity/instances.mjs.map +1 -1
- package/_mjs/data/Interval.mjs +114 -0
- package/_mjs/data/Interval.mjs.map +1 -0
- package/_mjs/data/Maybe/api.mjs +30 -35
- package/_mjs/data/Maybe/api.mjs.map +1 -1
- package/_mjs/data/Maybe/definition.mjs +37 -14
- package/_mjs/data/Maybe/definition.mjs.map +1 -1
- package/_mjs/data/Maybe/destructors.mjs +1 -0
- package/_mjs/data/Maybe/destructors.mjs.map +1 -1
- package/_mjs/data/Maybe/instances.mjs +56 -39
- package/_mjs/data/Maybe/instances.mjs.map +1 -1
- package/_mjs/data/Newtype.mjs +4 -3
- package/_mjs/data/Newtype.mjs.map +1 -1
- package/_mjs/data/Patch/api.mjs +1 -1
- package/_mjs/data/Patch/api.mjs.map +1 -1
- package/_mjs/data/Refinement/api.mjs +0 -4
- package/_mjs/data/Refinement/api.mjs.map +1 -1
- package/_mjs/data/Struct/definition.mjs +3 -2
- package/_mjs/data/Struct/definition.mjs.map +1 -1
- package/_mjs/data/These/api.mjs +262 -0
- package/_mjs/data/These/api.mjs.map +1 -0
- package/_mjs/data/These/constructors.mjs +14 -2
- package/_mjs/data/These/constructors.mjs.map +1 -1
- package/_mjs/data/These/definition.mjs +8 -0
- package/_mjs/data/These/definition.mjs.map +1 -1
- package/_mjs/data/These/destructors.mjs +53 -0
- package/_mjs/data/These/destructors.mjs.map +1 -1
- package/_mjs/data/These/instances.mjs +36 -0
- package/_mjs/data/These/instances.mjs.map +1 -0
- package/_mjs/data/These.mjs +1 -0
- package/_mjs/data/These.mjs.map +1 -1
- package/_mjs/data/bigint/definition.mjs +2 -0
- package/_mjs/data/bigint/definition.mjs.map +1 -0
- package/_mjs/data/bigint/instances.mjs +10 -0
- package/_mjs/data/bigint/instances.mjs.map +1 -0
- package/_mjs/data/bigint.mjs +4 -0
- package/_mjs/data/bigint.mjs.map +1 -0
- package/_mjs/data/boolean/definition.mjs +2 -0
- package/_mjs/data/boolean/definition.mjs.map +1 -0
- package/_mjs/data/boolean/instances.mjs +10 -0
- package/_mjs/data/boolean/instances.mjs.map +1 -0
- package/_mjs/data/boolean.mjs +4 -0
- package/_mjs/data/boolean.mjs.map +1 -0
- package/_mjs/data/number/instances.mjs +14 -4
- package/_mjs/data/number/instances.mjs.map +1 -1
- package/_mjs/data/object/instances.mjs +10 -0
- package/_mjs/data/object/instances.mjs.map +1 -0
- package/_mjs/data/string/instances.mjs +20 -8
- package/_mjs/data/string/instances.mjs.map +1 -1
- package/_mjs/internal/Stack.mjs +4 -0
- package/_mjs/internal/Stack.mjs.map +1 -1
- package/_mjs/json/EitherJson.mjs +18 -0
- package/_mjs/json/EitherJson.mjs.map +1 -0
- package/_mjs/json/MaybeJson.mjs +16 -0
- package/_mjs/json/MaybeJson.mjs.map +1 -0
- package/_mjs/json/TheseJson.mjs +22 -0
- package/_mjs/json/TheseJson.mjs.map +1 -0
- package/_mjs/optics/Optional/definition.mjs +5 -4
- package/_mjs/optics/Optional/definition.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/compose.mjs +1 -1
- package/_mjs/optics/Traversal/api/compose.mjs.map +1 -1
- package/_mjs/optics/Traversal/api/fromTraversable.mjs +5 -4
- package/_mjs/optics/Traversal/api/fromTraversable.mjs.map +1 -1
- package/_mjs/optics/Traversal/definition.mjs +14 -12
- package/_mjs/optics/Traversal/definition.mjs.map +1 -1
- package/_mjs/typeclass/Align.mjs +0 -11
- package/_mjs/typeclass/Align.mjs.map +1 -1
- package/_mjs/typeclass/Alt.mjs +4 -7
- package/_mjs/typeclass/Alt.mjs.map +1 -1
- package/_mjs/typeclass/Alternative.mjs +0 -13
- package/_mjs/typeclass/Alternative.mjs.map +1 -1
- package/_mjs/typeclass/Applicative.mjs +0 -12
- package/_mjs/typeclass/Applicative.mjs.map +1 -1
- package/_mjs/typeclass/ApplicativeExcept.mjs +32 -24
- package/_mjs/typeclass/ApplicativeExcept.mjs.map +1 -1
- package/_mjs/typeclass/Apply.mjs +85 -42
- package/_mjs/typeclass/Apply.mjs.map +1 -1
- package/_mjs/typeclass/Chain.mjs +33 -12
- package/_mjs/typeclass/Chain.mjs.map +1 -1
- package/_mjs/typeclass/Closure.mjs +1 -4
- package/_mjs/typeclass/Closure.mjs.map +1 -1
- package/_mjs/typeclass/Eq/definition.mjs +9 -0
- package/_mjs/typeclass/Eq/definition.mjs.map +1 -0
- package/_mjs/typeclass/Eq/derivations.mjs +46 -0
- package/_mjs/typeclass/Eq/derivations.mjs.map +1 -0
- package/_mjs/typeclass/Eq.mjs +1 -11
- package/_mjs/typeclass/Eq.mjs.map +1 -1
- package/_mjs/typeclass/Fail.mjs +5 -7
- package/_mjs/typeclass/Fail.mjs.map +1 -1
- package/_mjs/typeclass/Filterable.mjs +27 -13
- package/_mjs/typeclass/Filterable.mjs.map +1 -1
- package/_mjs/typeclass/FilterableWithIndex.mjs +0 -16
- package/_mjs/typeclass/FilterableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Foldable.mjs +29 -12
- package/_mjs/typeclass/Foldable.mjs.map +1 -1
- package/_mjs/typeclass/FoldableWithIndex.mjs +29 -13
- package/_mjs/typeclass/FoldableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Functor.mjs +16 -9
- package/_mjs/typeclass/Functor.mjs.map +1 -1
- package/_mjs/typeclass/FunctorWithIndex.mjs +0 -12
- package/_mjs/typeclass/FunctorWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Guard/api.mjs +23 -0
- package/_mjs/typeclass/Guard/api.mjs.map +1 -0
- package/_mjs/typeclass/Guard/definition.mjs +23 -0
- package/_mjs/typeclass/Guard/definition.mjs.map +1 -0
- package/_mjs/typeclass/Guard/derivations.mjs +67 -0
- package/_mjs/typeclass/Guard/derivations.mjs.map +1 -0
- package/_mjs/typeclass/Guard.mjs +4 -0
- package/_mjs/typeclass/Guard.mjs.map +1 -0
- package/_mjs/typeclass/HashEq.mjs +3 -3
- package/_mjs/typeclass/HashEq.mjs.map +1 -1
- package/_mjs/typeclass/Monad.mjs +0 -12
- package/_mjs/typeclass/Monad.mjs.map +1 -1
- package/_mjs/typeclass/MonadExcept.mjs +9 -13
- package/_mjs/typeclass/MonadExcept.mjs.map +1 -1
- package/_mjs/typeclass/Monoid.mjs +50 -1
- package/_mjs/typeclass/Monoid.mjs.map +1 -1
- package/_mjs/typeclass/Nil.mjs +8 -1
- package/_mjs/typeclass/Nil.mjs.map +1 -1
- package/_mjs/typeclass/Ord/api/contramap.mjs +2 -4
- package/_mjs/typeclass/Ord/api/contramap.mjs.map +1 -1
- package/_mjs/typeclass/Ord/api/max.mjs +1 -1
- package/_mjs/typeclass/Ord/api/max.mjs.map +1 -1
- package/_mjs/typeclass/Ord/api/min.mjs +1 -1
- package/_mjs/typeclass/Ord/api/min.mjs.map +1 -1
- package/_mjs/typeclass/Ord/definition.mjs +2 -3
- package/_mjs/typeclass/Ord/definition.mjs.map +1 -1
- package/_mjs/typeclass/Ord/instances.mjs +7 -7
- package/_mjs/typeclass/Ord/instances.mjs.map +1 -1
- package/_mjs/typeclass/Pointed.mjs +5 -4
- package/_mjs/typeclass/Pointed.mjs.map +1 -1
- package/_mjs/typeclass/Semialign.mjs +67 -74
- package/_mjs/typeclass/Semialign.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/api.mjs +2 -2
- package/_mjs/typeclass/Semigroup/api.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/definition.mjs.map +1 -1
- package/_mjs/typeclass/Semigroup/derivations.mjs +50 -0
- package/_mjs/typeclass/Semigroup/derivations.mjs.map +1 -0
- package/_mjs/typeclass/Semigroup.mjs +1 -1
- package/_mjs/typeclass/Semimonoidal.mjs +8 -6
- package/_mjs/typeclass/Semimonoidal.mjs.map +1 -1
- package/_mjs/typeclass/Showable/show.mjs +11 -11
- package/_mjs/typeclass/Showable/show.mjs.map +1 -1
- package/_mjs/typeclass/Traversable.mjs +25 -24
- package/_mjs/typeclass/Traversable.mjs.map +1 -1
- package/_mjs/typeclass/TraversableWithIndex.mjs +6 -24
- package/_mjs/typeclass/TraversableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass/Witherable.mjs +39 -32
- package/_mjs/typeclass/Witherable.mjs.map +1 -1
- package/_mjs/typeclass/WitherableWithIndex.mjs +39 -37
- package/_mjs/typeclass/WitherableWithIndex.mjs.map +1 -1
- package/_mjs/typeclass.mjs +1 -0
- package/_mjs/typeclass.mjs.map +1 -1
- package/_mjs/util/predicates.mjs +3 -0
- package/_mjs/util/predicates.mjs.map +1 -1
- package/_src/collection/Iterable/api/traverseConc.ts +21 -29
- package/_src/collection/Iterable/api.ts +20 -34
- package/_src/collection/compat/Array/api.ts +1 -1
- package/_src/collection/immutable/Conc/api.ts +26 -46
- package/_src/collection/immutable/Conc/definition.ts +19 -8
- package/_src/collection/immutable/Dictionary/definition.ts +1 -1
- package/_src/collection/immutable/HashMap/api.ts +24 -81
- package/_src/collection/immutable/HashMap/definition.ts +7 -9
- package/_src/collection/immutable/HashMap/internal.ts +1 -1
- package/_src/collection/immutable/HashSet/api.ts +4 -4
- package/_src/collection/immutable/ImmutableArray/api.ts +180 -219
- package/_src/collection/immutable/ImmutableArray/definition.ts +6 -8
- package/_src/collection/immutable/ImmutableArray/instances.ts +156 -134
- package/_src/collection/immutable/ImmutableNonEmptyArray/api.ts +87 -158
- package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +4 -8
- package/_src/collection/immutable/ImmutableNonEmptyArray/instances.ts +39 -49
- package/_src/collection/immutable/List/api.ts +2 -6
- package/_src/collection/immutable/RoseTree/api.ts +278 -0
- package/_src/collection/immutable/RoseTree/definition.ts +29 -0
- package/_src/collection/immutable/RoseTree.ts +4 -0
- package/_src/collection/immutable/SortedMap/api.ts +56 -53
- package/_src/collection/immutable/Vector/api.ts +57 -17
- package/_src/collection/immutable/Vector/definition.ts +10 -0
- package/_src/collection/mutable/HashMap.ts +5 -5
- package/_src/collection/mutable/HashSet.ts +4 -4
- package/_src/control/Eval/api.ts +5 -1
- package/_src/control/Eval/definition.ts +5 -8
- package/_src/control/Eval/instance.ts +16 -15
- package/_src/control/Z/definition.ts +26 -19
- package/_src/control/Z/instances.ts +9 -8
- package/_src/data/Branded/definition.ts +47 -0
- package/_src/data/Branded/derivations.ts +57 -0
- package/_src/data/Branded.ts +4 -0
- package/_src/data/Cause/api/fold.ts +1 -0
- package/_src/data/Cause/api.ts +18 -0
- package/_src/data/Const/api.ts +3 -3
- package/_src/data/Const/definition.ts +22 -5
- package/_src/data/Const/instances.ts +12 -21
- package/_src/data/DecodeError/definition.ts +227 -0
- package/_src/data/DecodeError.ts +3 -0
- package/_src/data/Decoder/api.ts +198 -0
- package/_src/data/Decoder/definition.ts +25 -0
- package/_src/data/Decoder.ts +4 -0
- package/_src/data/Duration/api.ts +21 -14
- package/_src/data/Either/api/alignWith.ts +2 -0
- package/_src/data/Either/api.ts +85 -30
- package/_src/data/Either/definition.ts +41 -19
- package/_src/data/Either/destructors.ts +1 -0
- package/_src/data/Either/instances.ts +102 -51
- package/_src/data/Environment/api.ts +19 -4
- package/_src/data/Identity/api.ts +19 -4
- package/_src/data/Identity/definition.ts +7 -3
- package/_src/data/Identity/instances.ts +15 -8
- package/_src/data/Interval.ts +103 -0
- package/_src/data/Maybe/api.ts +21 -31
- package/_src/data/Maybe/definition.ts +31 -19
- package/_src/data/Maybe/destructors.ts +1 -0
- package/_src/data/Maybe/instances.ts +61 -34
- package/_src/data/Newtype.ts +11 -32
- package/_src/data/Patch/api.ts +1 -1
- package/_src/data/Refinement/api.ts +4 -2
- package/_src/data/Struct/definition.ts +1 -1
- package/_src/data/These/api.ts +184 -0
- package/_src/data/These/constructors.ts +10 -0
- package/_src/data/These/definition.ts +7 -0
- package/_src/data/These/destructors.ts +45 -0
- package/_src/data/These/instances.ts +43 -0
- package/_src/data/These.ts +1 -0
- package/_src/data/bigint/definition.ts +13 -0
- package/_src/data/bigint/instances.ts +8 -0
- package/_src/data/bigint.ts +4 -0
- package/_src/data/boolean/definition.ts +13 -0
- package/_src/data/boolean/instances.ts +8 -0
- package/_src/data/boolean.ts +4 -0
- package/_src/data/number/instances.ts +13 -3
- package/_src/data/object/instances.ts +7 -0
- package/_src/data/string/instances.ts +17 -5
- package/_src/internal/Stack.ts +4 -0
- package/_src/json/EitherJson.ts +28 -0
- package/_src/json/MaybeJson.ts +27 -0
- package/_src/json/TheseJson.ts +31 -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 +15 -41
- package/_src/optics/Traversal/definition.ts +21 -23
- package/_src/typeclass/Align.ts +4 -18
- package/_src/typeclass/Alt.ts +59 -90
- package/_src/typeclass/Alternative.ts +4 -20
- package/_src/typeclass/Applicative.ts +3 -23
- package/_src/typeclass/ApplicativeExcept.ts +94 -193
- package/_src/typeclass/Apply.ts +319 -509
- package/_src/typeclass/Chain.ts +127 -199
- package/_src/typeclass/Closure.ts +4 -20
- package/_src/typeclass/Eq/definition.ts +20 -0
- package/_src/typeclass/Eq/derivations.ts +61 -0
- package/_src/typeclass/Eq.ts +2 -36
- package/_src/typeclass/Fail.ts +28 -27
- package/_src/typeclass/Filterable.ts +70 -117
- package/_src/typeclass/FilterableWithIndex.ts +27 -131
- package/_src/typeclass/Foldable.ts +35 -52
- package/_src/typeclass/FoldableWithIndex.ts +40 -75
- package/_src/typeclass/Functor.ts +21 -59
- package/_src/typeclass/FunctorWithIndex.ts +6 -34
- package/_src/typeclass/Guard/api.ts +32 -0
- package/_src/typeclass/Guard/definition.ts +23 -0
- package/_src/typeclass/Guard/derivations.ts +80 -0
- package/_src/typeclass/Guard.ts +5 -0
- package/_src/typeclass/HashEq.ts +3 -4
- package/_src/typeclass/Monad.ts +3 -18
- package/_src/typeclass/MonadExcept.ts +9 -32
- package/_src/typeclass/Monoid.ts +60 -2
- package/_src/typeclass/Nil.ts +26 -17
- package/_src/typeclass/Ord/api/contramap.ts +2 -4
- package/_src/typeclass/Ord/api/max.ts +1 -1
- package/_src/typeclass/Ord/api/min.ts +1 -1
- package/_src/typeclass/Ord/definition.ts +3 -19
- package/_src/typeclass/Ord/instances.ts +6 -6
- package/_src/typeclass/Pointed.ts +29 -25
- package/_src/typeclass/Semialign.ts +308 -444
- package/_src/typeclass/Semigroup/api.ts +2 -2
- package/_src/typeclass/Semigroup/definition.ts +2 -6
- package/_src/typeclass/Semigroup/derivations.ts +64 -0
- package/_src/typeclass/Semigroup.ts +1 -1
- package/_src/typeclass/Semimonoidal.ts +55 -84
- package/_src/typeclass/Showable/show.ts +6 -8
- package/_src/typeclass/Traversable.ts +67 -157
- package/_src/typeclass/TraversableWithIndex.ts +37 -127
- package/_src/typeclass/Witherable.ts +120 -279
- package/_src/typeclass/WitherableWithIndex.ts +129 -337
- package/_src/typeclass.ts +2 -0
- package/_src/util/predicates.ts +4 -0
- package/collection/Iterable/api/traverseConc.d.ts +6 -4
- package/collection/Iterable/api.d.ts +5 -13
- package/collection/immutable/Conc/api.d.ts +15 -23
- package/collection/immutable/Conc/definition.d.ts +10 -7
- package/collection/immutable/Dictionary/definition.d.ts +1 -1
- package/collection/immutable/HashMap/api.d.ts +15 -27
- package/collection/immutable/HashMap/definition.d.ts +6 -9
- package/collection/immutable/HashMap/internal.d.ts +1 -1
- package/collection/immutable/ImmutableArray/api.d.ts +42 -94
- package/collection/immutable/ImmutableArray/definition.d.ts +6 -8
- package/collection/immutable/ImmutableArray/instances.d.ts +86 -17
- package/collection/immutable/ImmutableNonEmptyArray/api.d.ts +26 -47
- package/collection/immutable/ImmutableNonEmptyArray/definition.d.ts +4 -8
- package/collection/immutable/ImmutableNonEmptyArray/instances.d.ts +1 -1
- package/collection/immutable/List/api.d.ts +1 -2
- package/collection/immutable/RoseTree/api.d.ts +63 -0
- package/collection/immutable/RoseTree/definition.d.ts +23 -0
- package/collection/immutable/RoseTree.d.ts +2 -0
- package/collection/immutable/SortedMap/api.d.ts +2 -1
- package/collection/immutable/Vector/api.d.ts +31 -8
- package/collection/immutable/Vector/definition.d.ts +10 -0
- package/control/Eval/api.d.ts +1 -0
- package/control/Eval/definition.d.ts +5 -8
- package/control/Eval/instance.d.ts +4 -1
- package/control/Z/definition.d.ts +23 -18
- package/control/Z/instances.d.ts +4 -3
- package/data/Branded/definition.d.ts +36 -0
- package/data/Branded/derivations.d.ts +24 -0
- package/data/Branded.d.ts +2 -0
- package/data/Cause/api.d.ts +7 -1
- package/data/Const/api.d.ts +1 -1
- package/data/Const/definition.d.ts +23 -7
- package/data/Const/instances.d.ts +4 -12
- package/data/DecodeError/definition.d.ts +141 -0
- package/data/DecodeError.d.ts +1 -0
- package/data/Decoder/api.d.ts +65 -0
- package/data/Decoder/definition.d.ts +24 -0
- package/data/Decoder.d.ts +2 -0
- package/data/Duration/api.d.ts +12 -8
- package/data/Either/api.d.ts +29 -17
- package/data/Either/definition.d.ts +31 -14
- package/data/Either/instances.d.ts +26 -11
- package/data/Environment/api.d.ts +5 -0
- package/data/Identity/api.d.ts +11 -0
- package/data/Identity/definition.d.ts +7 -2
- package/data/Identity/instances.d.ts +5 -9
- package/data/Interval.d.ts +71 -0
- package/data/Maybe/api.d.ts +3 -17
- package/data/Maybe/definition.d.ts +20 -14
- package/data/Maybe/instances.d.ts +14 -8
- package/data/Newtype.d.ts +8 -9
- package/data/Refinement/api.d.ts +2 -0
- package/data/Struct/definition.d.ts +1 -1
- package/data/These/api.d.ts +73 -0
- package/data/These/constructors.d.ts +7 -1
- package/data/These/definition.d.ts +5 -0
- package/data/These/destructors.d.ts +27 -1
- package/data/These/instances.d.ts +13 -0
- package/data/These.d.ts +1 -0
- package/data/bigint/definition.d.ts +13 -0
- package/data/bigint/instances.d.ts +7 -0
- package/data/bigint.d.ts +2 -0
- package/data/boolean/definition.d.ts +13 -0
- package/data/boolean/instances.d.ts +7 -0
- package/data/boolean.d.ts +2 -0
- package/data/number/instances.d.ts +8 -0
- package/data/object/instances.d.ts +7 -0
- package/data/string/instances.d.ts +10 -0
- package/internal/Stack.d.ts +1 -0
- package/json/EitherJson.d.ts +24 -0
- package/json/MaybeJson.d.ts +23 -0
- package/json/TheseJson.d.ts +26 -0
- package/optics/Traversal/api/fromTraversable.d.ts +1 -1
- package/optics/Traversal/definition.d.ts +4 -9
- package/package.json +4 -4
- package/typeclass/Align.d.ts +3 -10
- package/typeclass/Alt.d.ts +6 -19
- package/typeclass/Alternative.d.ts +4 -12
- package/typeclass/Applicative.d.ts +3 -12
- package/typeclass/ApplicativeExcept.d.ts +14 -39
- package/typeclass/Apply.d.ts +41 -72
- package/typeclass/Chain.d.ts +18 -28
- package/typeclass/Closure.d.ts +2 -12
- package/typeclass/Eq/definition.d.ts +17 -0
- package/typeclass/Eq/derivations.d.ts +24 -0
- package/typeclass/Eq.d.ts +2 -27
- package/typeclass/Fail.d.ts +4 -10
- package/typeclass/Filterable.d.ts +30 -51
- package/typeclass/FilterableWithIndex.d.ts +10 -53
- package/typeclass/Foldable.d.ts +19 -31
- package/typeclass/FoldableWithIndex.d.ts +20 -33
- package/typeclass/Functor.d.ts +11 -22
- package/typeclass/FunctorWithIndex.d.ts +3 -19
- package/typeclass/Guard/api.d.ts +20 -0
- package/typeclass/Guard/definition.d.ts +22 -0
- package/typeclass/Guard/derivations.d.ts +36 -0
- package/typeclass/Guard.d.ts +2 -0
- package/typeclass/HashEq.d.ts +1 -2
- package/typeclass/Monad.d.ts +3 -11
- package/typeclass/MonadExcept.d.ts +6 -17
- package/typeclass/Monoid.d.ts +24 -2
- package/typeclass/Nil.d.ts +7 -8
- package/typeclass/Ord/definition.d.ts +2 -14
- package/typeclass/Pointed.d.ts +4 -10
- package/typeclass/Semialign.d.ts +51 -63
- package/typeclass/Semigroup/definition.d.ts +3 -5
- package/typeclass/Semigroup/derivations.d.ts +25 -0
- package/typeclass/Semimonoidal.d.ts +5 -14
- package/typeclass/Traversable.d.ts +17 -57
- package/typeclass/TraversableWithIndex.d.ts +9 -52
- package/typeclass/Witherable.d.ts +22 -82
- package/typeclass/WitherableWithIndex.d.ts +26 -98
- package/typeclass.d.ts +1 -0
- package/util/predicates.d.ts +1 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
import { Decoder } from "@fncts/base/data/Decoder";
|
2
|
+
export interface LeftJson<E> {
|
3
|
+
readonly _tag: "Left";
|
4
|
+
readonly left: E;
|
5
|
+
}
|
6
|
+
export interface RightJson<A> {
|
7
|
+
readonly _tag: "Right";
|
8
|
+
readonly right: A;
|
9
|
+
}
|
10
|
+
export interface BothJson<E, A> {
|
11
|
+
readonly _tag: "Both";
|
12
|
+
readonly left: E;
|
13
|
+
readonly right: A;
|
14
|
+
}
|
15
|
+
export declare type TheseJson<E, A> = LeftJson<E> | RightJson<A> | BothJson<E, A>;
|
16
|
+
/**
|
17
|
+
* @tsplus type fncts.TheseJsonOps
|
18
|
+
*/
|
19
|
+
export interface TheseJsonOps {
|
20
|
+
}
|
21
|
+
export declare const TheseJson: TheseJsonOps;
|
22
|
+
/**
|
23
|
+
* @tsplus static fncts.TheseJsonOps getDecoder
|
24
|
+
* @tsplus location "@fncts/base/json/TheseJson"
|
25
|
+
*/
|
26
|
+
export declare function getDecoder<E, A>(left: Decoder<E>, right: Decoder<A>): Decoder<TheseJson<E, A>>;
|
@@ -5,4 +5,4 @@ import { PTraversal } from "@fncts/base/optics/Traversal/definition";
|
|
5
5
|
* @tsplus static fncts.optics.PTraversalOps fromTraversable
|
6
6
|
* @tsplus location "@fncts/base/optics/Traversal/api/fromTraversable"
|
7
7
|
*/
|
8
|
-
export declare function fromTraversable<T extends HKT
|
8
|
+
export declare function fromTraversable<T extends HKT>(T: P.Traversable<T>): <A, B, K = any, Q = unknown, W = never, X = never, I = any, S = any, R = unknown, E = never>() => PTraversal<import("@fncts/typelevel/HKT").HKT.Kind<T, K, Q, W, X, I, S, R, E, A>, import("@fncts/typelevel/HKT").HKT.Kind<T, K, Q, W, X, I, S, R, E, B>, A, B>;
|
@@ -6,11 +6,12 @@ import { PSetter } from "@fncts/base/optics/Setter";
|
|
6
6
|
* @tsplus type fncts.optics.PTraversal
|
7
7
|
*/
|
8
8
|
export interface PTraversal<S, T, A, B> extends PSetter<S, T, A, B>, Fold<S, A> {
|
9
|
-
|
10
|
-
|
9
|
+
modifyA<F extends HKT, K, Q, W, X, I, _S, R, E>(s: S, f: (a: A) => HKT.Kind<F, K, Q, W, X, I, _S, R, E, B>,
|
10
|
+
/** @tsplus auto */ F: Applicative<F>): HKT.Kind<F, K, Q, W, X, I, _S, R, E, T>;
|
11
11
|
}
|
12
12
|
export interface PTraversalMin<S, T, A, B> {
|
13
|
-
|
13
|
+
modifyA<F extends HKT, K, Q, W, X, I, _S, R, E>(s: S, f: (a: A) => HKT.Kind<F, K, Q, W, X, I, _S, R, E, B>,
|
14
|
+
/** @tsplus auto */ F: Applicative<F>): HKT.Kind<F, K, Q, W, X, I, _S, R, E, T>;
|
14
15
|
}
|
15
16
|
/**
|
16
17
|
* @tsplus type fncts.optics.PTraversalOps
|
@@ -38,9 +39,3 @@ export interface TraversalOps extends PTraversalOps {
|
|
38
39
|
* @tsplus location "@fncts/base/optics/Traversal/definition"
|
39
40
|
*/
|
40
41
|
export declare function mkTraversal<S, A>(F: PTraversalMin<S, S, A, A>): Traversal<S, A>;
|
41
|
-
export interface modifyA_<S, T, A, B> {
|
42
|
-
<F extends HKT, C = HKT.None>(F: Applicative<F, C>): <K, Q, W, X, I, _S, R, E>(s: S, f: (a: A) => HKT.Kind<F, C, K, Q, W, X, I, _S, R, E, B>) => HKT.Kind<F, C, K, Q, W, X, I, _S, R, E, T>;
|
43
|
-
}
|
44
|
-
export interface modifyA<S, T, A, B> {
|
45
|
-
<F extends HKT, C = HKT.None>(F: Applicative<F, C>): <K, Q, W, X, I, _S, R, E>(f: (a: A) => HKT.Kind<F, C, K, Q, W, X, I, _S, R, E, B>) => (s: S) => HKT.Kind<F, C, K, Q, W, X, I, _S, R, E, T>;
|
46
|
-
}
|
package/package.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fncts/base",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.4",
|
4
4
|
"dependencies": {
|
5
|
-
"@fncts/typelevel": "0.0.
|
5
|
+
"@fncts/typelevel": "0.0.4"
|
6
6
|
},
|
7
7
|
"exports": {
|
8
8
|
"./*": {
|
9
|
-
"import": "./_mjs
|
10
|
-
"require": "./_cjs
|
9
|
+
"import": "./_mjs/*.mjs",
|
10
|
+
"require": "./_cjs/*.cjs"
|
11
11
|
}
|
12
12
|
},
|
13
13
|
"publishConfig": {
|
package/typeclass/Align.d.ts
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
import { HKT } from "@fncts/typelevel/HKT";
|
2
|
-
import type { Nil
|
3
|
-
import type {
|
4
|
-
import { Semialign } from "@fncts/base/typeclass/Semialign";
|
2
|
+
import type { Nil } from "@fncts/base/typeclass/Nil";
|
3
|
+
import type { Semialign } from "@fncts/base/typeclass/Semialign";
|
5
4
|
/**
|
6
5
|
* @tsplus type fncts.Align
|
7
6
|
*/
|
8
|
-
export interface Align<F extends HKT
|
7
|
+
export interface Align<F extends HKT> extends Semialign<F>, Nil<F> {
|
9
8
|
}
|
10
9
|
/**
|
11
10
|
* @tsplus type fncts.AlignOps
|
@@ -13,9 +12,3 @@ export interface Align<F extends HKT, FC = HKT.None> extends Semialign<F, FC>, N
|
|
13
12
|
export interface AlignOps {
|
14
13
|
}
|
15
14
|
export declare const Align: AlignOps;
|
16
|
-
export declare type AlignMin<F extends HKT, FC = HKT.None> = SemialignMin<F, FC> & NilMin<F, FC>;
|
17
|
-
/**
|
18
|
-
* @tsplus static fncts.AlignOps __call
|
19
|
-
* @tsplus location "@fncts/base/typeclass/Align"
|
20
|
-
*/
|
21
|
-
export declare function mkAlign<F extends HKT, FC = HKT.None>(F: AlignMin<F, FC>): Align<F, FC>;
|
package/typeclass/Alt.d.ts
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
import { HKT } from "@fncts/typelevel/HKT";
|
2
|
-
import
|
3
|
-
import { Functor } from "@fncts/base/typeclass/Functor";
|
2
|
+
import { Lazy } from "@fncts/base/data/function/definition";
|
3
|
+
import type { Functor } from "@fncts/base/typeclass/Functor";
|
4
4
|
/**
|
5
5
|
* @tsplus type fncts.Alt
|
6
6
|
*/
|
7
|
-
export interface Alt<F extends HKT
|
8
|
-
|
9
|
-
readonly alt: alt<F, FC>;
|
7
|
+
export interface Alt<F extends HKT> extends Functor<F> {
|
8
|
+
alt<K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, B>(fa: HKT.Kind<F, K, Q, W, X, I, S, R, E, A>, that: Lazy<HKT.Kind<F, HKT.Intro<"K", K, K1>, HKT.Intro<"Q", Q, Q1>, HKT.Intro<"W", W, W1>, HKT.Intro<"X", X, X1>, HKT.Intro<"I", I, I1>, HKT.Intro<"S", S, S1>, HKT.Intro<"R", R, R1>, HKT.Intro<"E", E, E1>, HKT.Intro<"A", A, B>>>): HKT.Kind<F, HKT.Mix<"K", [K, K1]>, HKT.Mix<"Q", [Q, Q1]>, HKT.Mix<"W", [W, W1]>, HKT.Mix<"X", [X, X1]>, HKT.Mix<"I", [I, I1]>, HKT.Mix<"S", [S, S1]>, HKT.Mix<"R", [R, R1]>, HKT.Mix<"E", [E, E1]>, HKT.Mix<"A", [A, B]>>;
|
10
9
|
}
|
11
10
|
/**
|
12
11
|
* @tsplus type fncts.AltOps
|
@@ -14,17 +13,5 @@ export interface Alt<F extends HKT, FC = HKT.None> extends Functor<F, FC> {
|
|
14
13
|
export interface AltOps {
|
15
14
|
}
|
16
15
|
export declare const Alt: AltOps;
|
17
|
-
export declare
|
18
|
-
|
19
|
-
};
|
20
|
-
/**
|
21
|
-
* @tsplus static fncts.AltOps __call
|
22
|
-
* @tsplus location "@fncts/base/typeclass/Alt"
|
23
|
-
*/
|
24
|
-
export declare function mkAlt<F extends HKT, C = HKT.None>(F: AltMin<F, C>): Alt<F, C>;
|
25
|
-
export interface alt<F extends HKT, C = HKT.None> {
|
26
|
-
<K1, Q1, W1, X1, I1, S1, R1, E1, B>(that: () => HKT.Kind<F, C, K1, Q1, W1, X1, I1, S1, R1, E1, B>): <K, Q, W, X, I, S, R, E, A>(fa: HKT.Kind<F, C, HKT.Intro<F, "K", K1, K>, HKT.Intro<F, "Q", Q1, Q>, HKT.Intro<F, "W", W1, W>, HKT.Intro<F, "X", X1, X>, HKT.Intro<F, "I", I1, I>, HKT.Intro<F, "S", S1, S>, HKT.Intro<F, "R", R1, R>, HKT.Intro<F, "E", E1, E>, HKT.Intro<F, "A", B, A>>) => HKT.Kind<F, C, HKT.Mix<F, "K", [K1, K]>, HKT.Mix<F, "Q", [Q1, Q]>, HKT.Mix<F, "W", [W1, W]>, HKT.Mix<F, "X", [X1, X]>, HKT.Mix<F, "I", [I1, I]>, HKT.Mix<F, "S", [S1, S]>, HKT.Mix<F, "R", [R1, R]>, HKT.Mix<F, "E", [E1, E]>, HKT.Mix<F, "A", [B, A]>>;
|
27
|
-
}
|
28
|
-
export interface alt_<F extends HKT, C = HKT.None> {
|
29
|
-
<K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, B>(fa: HKT.Kind<F, C, K, Q, W, X, I, S, R, E, A>, that: () => HKT.Kind<F, C, HKT.Intro<F, "K", K, K1>, HKT.Intro<F, "Q", Q, Q1>, HKT.Intro<F, "W", W, W1>, HKT.Intro<F, "X", X, X1>, HKT.Intro<F, "I", I, I1>, HKT.Intro<F, "S", S, S1>, HKT.Intro<F, "R", R, R1>, HKT.Intro<F, "E", E, E1>, HKT.Intro<F, "A", A, B>>): HKT.Kind<F, C, HKT.Mix<F, "K", [K, K1]>, HKT.Mix<F, "Q", [Q, Q1]>, HKT.Mix<F, "W", [W, W1]>, HKT.Mix<F, "X", [X, X1]>, HKT.Mix<F, "I", [I, I1]>, HKT.Mix<F, "S", [S, S1]>, HKT.Mix<F, "R", [R, R1]>, HKT.Mix<F, "E", [E, E1]>, HKT.Mix<F, "A", [A, B]>>;
|
30
|
-
}
|
16
|
+
export declare function alt<F extends HKT, K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, B>(self: HKT.Kind<F, K, Q, W, X, I, S, R, E, A>, that: Lazy<HKT.Kind<F, HKT.Intro<"K", K, K1>, HKT.Intro<"Q", Q, Q1>, HKT.Intro<"W", W, W1>, HKT.Intro<"X", X, X1>, HKT.Intro<"I", I, I1>, HKT.Intro<"S", S, S1>, HKT.Intro<"R", R, R1>, HKT.Intro<"E", E, E1>, HKT.Intro<"A", A, B>>>,
|
17
|
+
/** @tsplus auto */ F: Alt<F>): HKT.Kind<F, HKT.Mix<"K", [K, K1]>, HKT.Mix<"Q", [Q, Q1]>, HKT.Mix<"W", [W, W1]>, HKT.Mix<"X", [X, X1]>, HKT.Mix<"I", [I, I1]>, HKT.Mix<"S", [S, S1]>, HKT.Mix<"R", [R, R1]>, HKT.Mix<"E", [E, E1]>, HKT.Mix<"A", [A, B]>>;
|
@@ -1,13 +1,11 @@
|
|
1
1
|
import { HKT } from "@fncts/typelevel/HKT";
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
import type { Nil
|
5
|
-
import { Alt } from "@fncts/base/typeclass/Alt";
|
6
|
-
import { Applicative } from "@fncts/base/typeclass/Applicative";
|
2
|
+
import type { Alt } from "@fncts/base/typeclass/Alt";
|
3
|
+
import type { Applicative } from "@fncts/base/typeclass/Applicative";
|
4
|
+
import type { Nil } from "@fncts/base/typeclass/Nil";
|
7
5
|
/**
|
8
6
|
* @tsplus type fncts.Alternative
|
9
7
|
*/
|
10
|
-
export interface Alternative<F extends HKT
|
8
|
+
export interface Alternative<F extends HKT> extends Applicative<F>, Nil<F>, Alt<F> {
|
11
9
|
}
|
12
10
|
/**
|
13
11
|
* @tsplus type fncts.AlternativeOps
|
@@ -15,9 +13,3 @@ export interface Alternative<F extends HKT, FC = HKT.None> extends Applicative<F
|
|
15
13
|
export interface AlternativeOps {
|
16
14
|
}
|
17
15
|
export declare const Alternative: AlternativeOps;
|
18
|
-
export declare type AlternativeMin<F extends HKT, FC = HKT.None> = ApplicativeMin<F, FC> & NilMin<F, FC> & AltMin<F, FC>;
|
19
|
-
/**
|
20
|
-
* @tsplus static fncts.AlternativeOps __call
|
21
|
-
* @tsplus location "@fncts/base/typeclass/Alternative"
|
22
|
-
*/
|
23
|
-
export declare function mkAlternative<F extends HKT, C = HKT.None>(F: AlternativeMin<F, C>): Alternative<F, C>;
|
@@ -1,9 +1,7 @@
|
|
1
1
|
import { HKT } from "@fncts/typelevel/HKT";
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
|
5
|
-
import { Pointed } from "@fncts/base/typeclass/Pointed";
|
6
|
-
export interface Applicative<F extends HKT, FC = HKT.None> extends Apply<F, FC>, Pointed<F, FC> {
|
2
|
+
import type { Apply } from "@fncts/base/typeclass/Apply";
|
3
|
+
import type { Pointed } from "@fncts/base/typeclass/Pointed";
|
4
|
+
export interface Applicative<F extends HKT> extends Apply<F>, Pointed<F> {
|
7
5
|
}
|
8
6
|
/**
|
9
7
|
* @tsplus type fncts.ApplicativeOps
|
@@ -11,10 +9,3 @@ export interface Applicative<F extends HKT, FC = HKT.None> extends Apply<F, FC>,
|
|
11
9
|
export interface ApplicativeOps {
|
12
10
|
}
|
13
11
|
export declare const Applicative: ApplicativeOps;
|
14
|
-
export declare type ApplicativeMin<F extends HKT, FC = HKT.None> = ApplyMin<F, FC> & PointedMin<F, FC>;
|
15
|
-
/**
|
16
|
-
* @tsplus static fncts.ApplicativeOps __call
|
17
|
-
* @tsplus location "@fncts/base/typeclass/Applicative"
|
18
|
-
*/
|
19
|
-
export declare function mkApplicative<F extends HKT, FC = HKT.None>(F: ApplicativeMin<F, FC>): Applicative<F, FC>;
|
20
|
-
export declare type CompatibleApplicative<F extends HKT, C, A> = Applicative<F, C> & ([A] extends [HKT.Kind<F, any, any, any, any, any, any, any, any, any, any>] ? unknown : ["invalid Applicative instance for", A]);
|
@@ -1,18 +1,13 @@
|
|
1
|
-
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
2
1
|
import { HKT } from "@fncts/typelevel/HKT";
|
2
|
+
import { Maybe } from "@fncts/base/data/Maybe/definition";
|
3
3
|
import { Either } from "@fncts/base/data/Either/definition";
|
4
|
-
import type {
|
5
|
-
import type { Fail
|
6
|
-
import { Applicative } from "@fncts/base/typeclass/Applicative";
|
4
|
+
import type { Applicative } from "@fncts/base/typeclass/Applicative";
|
5
|
+
import type { Fail } from "@fncts/base/typeclass/Fail";
|
7
6
|
/**
|
8
7
|
* @tsplus type fncts.ApplicativeExcept
|
9
8
|
*/
|
10
|
-
export interface ApplicativeExcept<F extends HKT
|
11
|
-
|
12
|
-
readonly catchAll: CatchAllFn<F, C>;
|
13
|
-
readonly catchJust_: CatchJustFn_<F, C>;
|
14
|
-
readonly catchJust: CatchJustFn<F, C>;
|
15
|
-
readonly either: EitherFn<F, C>;
|
9
|
+
export interface ApplicativeExcept<F extends HKT> extends Applicative<F>, Fail<F> {
|
10
|
+
catchAll<K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, A1>(fa: HKT.Kind<F, K, Q, W, X, I, S, R, E, A>, f: (e: E) => HKT.Kind<F, HKT.Intro<"K", K, K1>, HKT.Intro<"Q", Q, Q1>, HKT.Intro<"W", W, W1>, HKT.Intro<"X", X, X1>, HKT.Intro<"I", I, I1>, HKT.Intro<"S", S, S1>, HKT.Intro<"R", R, R1>, HKT.Intro<"E", E, E1>, A1>): HKT.Kind<F, HKT.Mix<"K", [K, K1]>, HKT.Mix<"Q", [Q, Q1]>, HKT.Mix<"W", [W, W1]>, HKT.Mix<"X", [X, X1]>, HKT.Mix<"I", [I, I1]>, HKT.Mix<"S", [S, S1]>, HKT.Mix<"R", [R, R1]>, E1, A | A1>;
|
16
11
|
}
|
17
12
|
/**
|
18
13
|
* @tsplus type fncts.ApplicativeExceptOps
|
@@ -20,41 +15,21 @@ export interface ApplicativeExcept<F extends HKT.CovariantE, C = HKT.None> exten
|
|
20
15
|
export interface ApplicativeExceptOps {
|
21
16
|
}
|
22
17
|
export declare const ApplicativeExcept: ApplicativeExceptOps;
|
23
|
-
export declare type ApplicativeExceptMin<F extends HKT.CovariantE, C = HKT.None> = ApplicativeMin<F, C> & FailMin<F, C> & {
|
24
|
-
readonly catchAll_: CatchAllFn_<F, C>;
|
25
|
-
};
|
26
|
-
/**
|
27
|
-
* @tsplus static fncts.ApplicativeExceptOps __call
|
28
|
-
* @tsplus location "@fncts/base/typeclass/ApplicativeExcept"
|
29
|
-
*/
|
30
|
-
export declare function mkApplicativeExcept<F extends HKT.CovariantE, C = HKT.None>(F: ApplicativeExceptMin<F, C>): ApplicativeExcept<F, C>;
|
31
|
-
export interface CatchAllFn_<F extends HKT.CovariantE, C = HKT.None> {
|
32
|
-
<K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, A1>(fa: HKT.Kind<F, C, K, Q, W, X, I, S, R, E, A>, f: (e: HKT.OrFix<C, "E", E>) => HKT.Kind<F, C, HKT.Intro<F, "K", K, K1>, HKT.Intro<F, "Q", Q, Q1>, HKT.Intro<F, "W", W, W1>, HKT.Intro<F, "X", X, X1>, HKT.Intro<F, "I", I, I1>, HKT.Intro<F, "S", S, S1>, HKT.Intro<F, "R", R, R1>, HKT.Intro<F, "E", E, E1>, A1>): HKT.Kind<F, C, HKT.Mix<F, "K", [K, K1]>, HKT.Mix<F, "Q", [Q, Q1]>, HKT.Mix<F, "W", [W, W1]>, HKT.Mix<F, "X", [X, X1]>, HKT.Mix<F, "I", [I, I1]>, HKT.Mix<F, "S", [S, S1]>, HKT.Mix<F, "R", [R, R1]>, E1, A | A1>;
|
33
|
-
}
|
34
|
-
export interface CatchAllFn<F extends HKT.CovariantE, C = HKT.None> {
|
35
|
-
<E, K1, Q1, W1, X1, I1, S1, R1, E1, A1>(f: (e: HKT.OrFix<C, "E", E>) => HKT.Kind<F, C, K1, Q1, W1, X1, I1, S1, R1, E1, A1>): <K, Q, W, X, I, S, R, A>(fa: HKT.Kind<F, C, HKT.Intro<F, "K", K1, K>, HKT.Intro<F, "Q", Q1, Q>, HKT.Intro<F, "W", W1, W>, HKT.Intro<F, "X", X1, X>, HKT.Intro<F, "I", I1, I>, HKT.Intro<F, "S", S1, S>, HKT.Intro<F, "R", R1, R>, HKT.Intro<F, "E", E1, E>, A>) => HKT.Kind<F, C, HKT.Mix<F, "K", [K1, K]>, HKT.Mix<F, "Q", [Q1, Q]>, HKT.Mix<F, "W", [W1, W]>, HKT.Mix<F, "X", [X1, X]>, HKT.Mix<F, "I", [I1, I]>, HKT.Mix<F, "S", [S1, S]>, HKT.Mix<F, "R", [R1, R]>, E1, A | A1>;
|
36
|
-
}
|
37
|
-
export interface CatchJustFn_<F extends HKT.CovariantE, C = HKT.None> {
|
38
|
-
<K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, A1>(fa: HKT.Kind<F, C, K, Q, W, X, I, S, R, E, A>, f: (e: HKT.OrFix<C, "E", E>) => Maybe<HKT.Kind<F, C, HKT.Intro<F, "K", K, K1>, HKT.Intro<F, "Q", Q, Q1>, HKT.Intro<F, "W", W, W1>, HKT.Intro<F, "X", X, X1>, HKT.Intro<F, "I", I, I1>, HKT.Intro<F, "S", S, S1>, HKT.Intro<F, "R", R, R1>, HKT.Intro<F, "E", E, E1>, A1>>): HKT.Kind<F, C, HKT.Mix<F, "K", [K, K1]>, HKT.Mix<F, "Q", [Q, Q1]>, HKT.Mix<F, "W", [W, W1]>, HKT.Mix<F, "X", [X, X1]>, HKT.Mix<F, "I", [I, I1]>, HKT.Mix<F, "S", [S, S1]>, HKT.Mix<F, "R", [R, R1]>, HKT.Mix<F, "E", [E, E1]>, A | A1>;
|
39
|
-
}
|
40
18
|
/**
|
41
|
-
* @tsplus
|
19
|
+
* @tsplus fluent fncts.Kind catchAll
|
42
20
|
* @tsplus location "@fncts/base/typeclass/ApplicativeExcept"
|
43
21
|
*/
|
44
|
-
export declare function
|
45
|
-
|
46
|
-
<E, K1, Q1, W1, X1, I1, S1, R1, E1, A1>(f: (e: HKT.OrFix<C, "E", E>) => Maybe<HKT.Kind<F, C, K1, Q1, W1, X1, I1, S1, R1, E1, A1>>): <K, Q, W, X, I, S, R, A>(fa: HKT.Kind<F, C, HKT.Intro<F, "K", K1, K>, HKT.Intro<F, "Q", Q1, Q>, HKT.Intro<F, "W", W1, W>, HKT.Intro<F, "X", X1, X>, HKT.Intro<F, "I", I1, I>, HKT.Intro<F, "S", S1, S>, HKT.Intro<F, "R", R1, R>, HKT.Intro<F, "E", E1, E>, A>) => HKT.Kind<F, C, HKT.Mix<F, "K", [K1, K]>, HKT.Mix<F, "Q", [Q1, Q]>, HKT.Mix<F, "W", [W1, W]>, HKT.Mix<F, "X", [X1, X]>, HKT.Mix<F, "I", [I1, I]>, HKT.Mix<F, "S", [S1, S]>, HKT.Mix<F, "R", [R1, R]>, HKT.Mix<F, "E", [E1, E]>, A | A1>;
|
47
|
-
}
|
22
|
+
export declare function catchAll<F extends HKT, K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, A1>(fa: HKT.Kind<F, K, Q, W, X, I, S, R, E, A>, f: (e: E) => HKT.Kind<F, HKT.Intro<"K", K, K1>, HKT.Intro<"Q", Q, Q1>, HKT.Intro<"W", W, W1>, HKT.Intro<"X", X, X1>, HKT.Intro<"I", I, I1>, HKT.Intro<"S", S, S1>, HKT.Intro<"R", R, R1>, HKT.Intro<"E", E, E1>, A1>,
|
23
|
+
/** @tsplus auto */ F: ApplicativeExcept<F>): HKT.Kind<F, HKT.Mix<"K", [K, K1]>, HKT.Mix<"Q", [Q, Q1]>, HKT.Mix<"W", [W, W1]>, HKT.Mix<"X", [X, X1]>, HKT.Mix<"I", [I, I1]>, HKT.Mix<"S", [S, S1]>, HKT.Mix<"R", [R, R1]>, E1, A | A1>;
|
48
24
|
/**
|
49
|
-
* @tsplus
|
25
|
+
* @tsplus fluent fncts.Kind catchJust
|
50
26
|
* @tsplus location "@fncts/base/typeclass/ApplicativeExcept"
|
51
27
|
*/
|
52
|
-
export declare function
|
53
|
-
|
54
|
-
<K, Q, W, X, I, S, R, E, A>(fa: HKT.Kind<F, C, K, Q, W, X, I, S, R, E, A>): HKT.Kind<F, C, K, Q, W, X, I, S, R, never, Either<HKT.OrFix<C, "E", E>, A>>;
|
55
|
-
}
|
28
|
+
export declare function catchJust<F extends HKT, K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, A1>(fa: HKT.Kind<F, K, Q, W, X, I, S, R, E, A>, f: (e: E) => Maybe<HKT.Kind<F, HKT.Intro<"K", K, K1>, HKT.Intro<"Q", Q, Q1>, HKT.Intro<"W", W, W1>, HKT.Intro<"X", X, X1>, HKT.Intro<"I", I, I1>, HKT.Intro<"S", S, S1>, HKT.Intro<"R", R, R1>, HKT.Intro<"E", E, E1>, A1>>,
|
29
|
+
/** @tsplus auto */ F: ApplicativeExcept<F>): HKT.Kind<F, HKT.Mix<"K", [K, K1]>, HKT.Mix<"Q", [Q, Q1]>, HKT.Mix<"W", [W, W1]>, HKT.Mix<"X", [X, X1]>, HKT.Mix<"I", [I, I1]>, HKT.Mix<"S", [S, S1]>, HKT.Mix<"R", [R, R1]>, HKT.Mix<"E", [E, E1]>, A | A1>;
|
56
30
|
/**
|
57
|
-
* @tsplus
|
31
|
+
* @tsplus fluent fncts.Kind either
|
58
32
|
* @tsplus location "@fncts/base/typeclass/ApplicativeExcept"
|
59
33
|
*/
|
60
|
-
export declare function
|
34
|
+
export declare function either<F extends HKT, K, Q, W, X, I, S, R, E, A>(self: HKT.Kind<F, K, Q, W, X, I, S, R, E, A>,
|
35
|
+
/** @tsplus auto */ F: ApplicativeExcept<F>): HKT.Kind<F, K, Q, W, X, I, S, R, never, Either<E, A>>;
|
package/typeclass/Apply.d.ts
CHANGED
@@ -1,20 +1,12 @@
|
|
1
1
|
import { HKT } from "@fncts/typelevel/HKT";
|
2
|
-
import type {
|
2
|
+
import type { Functor } from "@fncts/base/typeclass/Functor";
|
3
3
|
import type { Semimonoidal } from "@fncts/base/typeclass/Semimonoidal";
|
4
4
|
import type { Object } from "@fncts/typelevel";
|
5
|
-
import { Functor } from "@fncts/base/typeclass/Functor";
|
6
5
|
/**
|
7
6
|
* @tsplus type fncts.Apply
|
8
7
|
*/
|
9
|
-
export interface Apply<F extends HKT
|
10
|
-
|
11
|
-
readonly ap: ap<F, FC>;
|
12
|
-
readonly apFirst_: apFirst_<F, FC>;
|
13
|
-
readonly apFirst: apFirst<F, FC>;
|
14
|
-
readonly apSecond_: apSecond_<F, FC>;
|
15
|
-
readonly apSecond: apSecond<F, FC>;
|
16
|
-
readonly zipWith_: zipWith_<F, FC>;
|
17
|
-
readonly zipWith: zipWith<F, FC>;
|
8
|
+
export interface Apply<F extends HKT> extends Semimonoidal<F>, Functor<F> {
|
9
|
+
zipWith<K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B, D>(self: HKT.Kind<F, K1, Q1, W1, X1, I1, S1, R1, E1, A>, that: HKT.Kind<F, HKT.Intro<"K", K1, K2>, HKT.Intro<"Q", Q1, Q2>, HKT.Intro<"W", W1, W2>, HKT.Intro<"X", X1, X2>, HKT.Intro<"I", I1, I2>, HKT.Intro<"S", S1, S2>, HKT.Intro<"R", R1, R2>, HKT.Intro<"E", E1, E2>, B>, f: (a: A, b: B) => D): HKT.Kind<F, HKT.Mix<"K", [K1, K2]>, HKT.Mix<"Q", [Q1, Q2]>, HKT.Mix<"W", [W1, W2]>, HKT.Mix<"X", [X1, X2]>, HKT.Mix<"I", [I1, I2]>, HKT.Mix<"S", [S1, S2]>, HKT.Mix<"R", [R1, R2]>, HKT.Mix<"E", [E1, E2]>, D>;
|
18
10
|
}
|
19
11
|
/**
|
20
12
|
* @tsplus type fncts.ApplyOps
|
@@ -22,82 +14,59 @@ export interface Apply<F extends HKT, FC = HKT.None> extends Semimonoidal<F, FC>
|
|
22
14
|
export interface ApplyOps {
|
23
15
|
}
|
24
16
|
export declare const Apply: ApplyOps;
|
25
|
-
export declare type ApplyMin<F extends HKT, FC = HKT.None> = {
|
26
|
-
readonly ap_: ap_<F, FC>;
|
27
|
-
zipWith_: zipWith_<F, FC>;
|
28
|
-
} & FunctorMin<F, FC>;
|
29
17
|
/**
|
30
|
-
* @tsplus
|
18
|
+
* @tsplus fluent fncts.Kind zipWith
|
31
19
|
* @tsplus location "@fncts/base/typeclass/Apply"
|
32
20
|
*/
|
33
|
-
export declare function
|
34
|
-
|
35
|
-
<K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B>(fab: HKT.Kind<F, FC, K1, Q1, W1, X1, I1, S1, R1, E1, (a: A) => B>, fa: HKT.Kind<F, FC, HKT.Intro<F, "K", K1, K2>, HKT.Intro<F, "Q", Q1, Q2>, HKT.Intro<F, "W", W1, W2>, HKT.Intro<F, "X", X1, X2>, HKT.Intro<F, "I", I1, I2>, HKT.Intro<F, "S", S1, S2>, HKT.Intro<F, "R", R1, R2>, HKT.Intro<F, "E", E1, E2>, A>): HKT.Kind<F, FC, HKT.Mix<F, "K", [K1, K2]>, HKT.Mix<F, "Q", [Q1, Q2]>, HKT.Mix<F, "W", [W1, W2]>, HKT.Mix<F, "X", [X1, X2]>, HKT.Mix<F, "I", [I1, I2]>, HKT.Mix<F, "S", [S1, S2]>, HKT.Mix<F, "R", [R1, R2]>, HKT.Mix<F, "E", [E1, E2]>, B>;
|
36
|
-
}
|
37
|
-
export interface ap<F extends HKT, FC = HKT.None> {
|
38
|
-
<K1, Q1, W1, X1, I1, S1, R1, E1, A>(fa: HKT.Kind<F, FC, K1, Q1, W1, X1, I1, S1, R1, E1, A>): <K2, Q2, W2, X2, I2, S2, R2, E2, B>(fab: HKT.Kind<F, FC, HKT.Intro<F, "K", K1, K2>, HKT.Intro<F, "Q", Q1, Q2>, HKT.Intro<F, "W", W1, W2>, HKT.Intro<F, "X", X1, X2>, HKT.Intro<F, "I", I1, I2>, HKT.Intro<F, "S", S1, S2>, HKT.Intro<F, "R", R1, R2>, HKT.Intro<F, "E", E1, E2>, (a: A) => B>) => HKT.Kind<F, FC, HKT.Mix<F, "K", [K1, K2]>, HKT.Mix<F, "Q", [Q1, Q2]>, HKT.Mix<F, "W", [W1, W2]>, HKT.Mix<F, "X", [X1, X2]>, HKT.Mix<F, "I", [I1, I2]>, HKT.Mix<F, "S", [S1, S2]>, HKT.Mix<F, "R", [R1, R2]>, HKT.Mix<F, "E", [E1, E2]>, B>;
|
39
|
-
}
|
40
|
-
export interface apFirst_<F extends HKT, FC = HKT.None> {
|
41
|
-
<K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B>(fa: HKT.Kind<F, FC, K1, Q1, W1, X1, I1, S1, R1, E1, A>, fb: HKT.Kind<F, FC, HKT.Intro<F, "K", K1, K2>, HKT.Intro<F, "Q", Q1, Q2>, HKT.Intro<F, "W", W1, W2>, HKT.Intro<F, "X", X1, X2>, HKT.Intro<F, "I", I1, I2>, HKT.Intro<F, "S", S1, S2>, HKT.Intro<F, "R", R1, R2>, HKT.Intro<F, "E", E1, E2>, B>): HKT.Kind<F, FC, HKT.Mix<F, "K", [K1, K2]>, HKT.Mix<F, "Q", [Q1, Q2]>, HKT.Mix<F, "W", [W1, W2]>, HKT.Mix<F, "X", [X1, X2]>, HKT.Mix<F, "I", [I1, I2]>, HKT.Mix<F, "S", [S1, S2]>, HKT.Mix<F, "R", [R1, R2]>, HKT.Mix<F, "E", [E1, E2]>, A>;
|
42
|
-
}
|
43
|
-
export interface apFirst<F extends HKT, FC = HKT.None> {
|
44
|
-
<K1, Q1, W1, X1, I1, S1, R1, E1, B>(fb: HKT.Kind<F, FC, K1, Q1, W1, X1, I1, S1, R1, E1, B>): <K2, Q2, W2, X2, I2, S2, R2, E2, A>(fa: HKT.Kind<F, FC, HKT.Intro<F, "K", K1, K2>, HKT.Intro<F, "Q", Q1, Q2>, HKT.Intro<F, "W", W1, W2>, HKT.Intro<F, "X", X1, X2>, HKT.Intro<F, "I", I1, I2>, HKT.Intro<F, "S", S1, S2>, HKT.Intro<F, "R", R1, R2>, HKT.Intro<F, "E", E1, E2>, A>) => HKT.Kind<F, FC, HKT.Mix<F, "K", [K1, K2]>, HKT.Mix<F, "Q", [Q1, Q2]>, HKT.Mix<F, "W", [W1, W2]>, HKT.Mix<F, "X", [X1, X2]>, HKT.Mix<F, "I", [I1, I2]>, HKT.Mix<F, "S", [S1, S2]>, HKT.Mix<F, "R", [R1, R2]>, HKT.Mix<F, "E", [E1, E2]>, A>;
|
45
|
-
}
|
46
|
-
export interface apSecond_<F extends HKT, FC = HKT.None> {
|
47
|
-
<K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B>(fa: HKT.Kind<F, FC, K1, Q1, W1, X1, I1, S1, R1, E1, A>, fb: HKT.Kind<F, FC, HKT.Intro<F, "K", K1, K2>, HKT.Intro<F, "Q", Q1, Q2>, HKT.Intro<F, "W", W1, W2>, HKT.Intro<F, "X", X1, X2>, HKT.Intro<F, "I", I1, I2>, HKT.Intro<F, "S", S1, S2>, HKT.Intro<F, "R", R1, R2>, HKT.Intro<F, "E", E1, E2>, B>): HKT.Kind<F, FC, HKT.Mix<F, "K", [K1, K2]>, HKT.Mix<F, "Q", [Q1, Q2]>, HKT.Mix<F, "W", [W1, W2]>, HKT.Mix<F, "X", [X1, X2]>, HKT.Mix<F, "I", [I1, I2]>, HKT.Mix<F, "S", [S1, S2]>, HKT.Mix<F, "R", [R1, R2]>, HKT.Mix<F, "E", [E1, E2]>, B>;
|
48
|
-
}
|
49
|
-
export interface apSecond<F extends HKT, FC = HKT.None> {
|
50
|
-
<K1, Q1, W1, X1, I1, S1, R1, E1, B>(fb: HKT.Kind<F, FC, K1, Q1, W1, X1, I1, S1, R1, E1, B>): <K2, Q2, W2, X2, I2, S2, R2, E2, A>(fa: HKT.Kind<F, FC, HKT.Intro<F, "K", K1, K2>, HKT.Intro<F, "Q", Q1, Q2>, HKT.Intro<F, "W", W1, W2>, HKT.Intro<F, "X", X1, X2>, HKT.Intro<F, "I", I1, I2>, HKT.Intro<F, "S", S1, S2>, HKT.Intro<F, "R", R1, R2>, HKT.Intro<F, "E", E1, E2>, A>) => HKT.Kind<F, FC, HKT.Mix<F, "K", [K1, K2]>, HKT.Mix<F, "Q", [Q1, Q2]>, HKT.Mix<F, "W", [W1, W2]>, HKT.Mix<F, "X", [X1, X2]>, HKT.Mix<F, "I", [I1, I2]>, HKT.Mix<F, "S", [S1, S2]>, HKT.Mix<F, "R", [R1, R2]>, HKT.Mix<F, "E", [E1, E2]>, B>;
|
51
|
-
}
|
52
|
-
export interface zipWith_<F extends HKT, FC = HKT.None> {
|
53
|
-
<K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B, C>(fa: HKT.Kind<F, FC, K1, Q1, W1, X1, I1, S1, R1, E1, A>, fb: HKT.Kind<F, FC, HKT.Intro<F, "K", K1, K2>, HKT.Intro<F, "Q", Q1, Q2>, HKT.Intro<F, "W", W1, W2>, HKT.Intro<F, "X", X1, X2>, HKT.Intro<F, "I", I1, I2>, HKT.Intro<F, "S", S1, S2>, HKT.Intro<F, "R", R1, R2>, HKT.Intro<F, "E", E1, E2>, B>, f: (a: A, b: B) => C): HKT.Kind<F, FC, HKT.Mix<F, "K", [K1, K2]>, HKT.Mix<F, "Q", [Q1, Q2]>, HKT.Mix<F, "W", [W1, W2]>, HKT.Mix<F, "X", [X1, X2]>, HKT.Mix<F, "I", [I1, I2]>, HKT.Mix<F, "S", [S1, S2]>, HKT.Mix<F, "R", [R1, R2]>, HKT.Mix<F, "E", [E1, E2]>, C>;
|
54
|
-
}
|
55
|
-
export interface zipWith<F extends HKT, FC = HKT.None> {
|
56
|
-
<A, K1, Q1, W1, X1, I1, S1, R1, E1, B, C>(fb: HKT.Kind<F, FC, K1, Q1, W1, X1, I1, S1, R1, E1, B>, f: (a: A, b: B) => C): <K2, Q2, W2, X2, I2, S2, R2, E2>(fa: HKT.Kind<F, FC, HKT.Intro<F, "K", K1, K2>, HKT.Intro<F, "Q", Q1, Q2>, HKT.Intro<F, "W", W1, W2>, HKT.Intro<F, "X", X1, X2>, HKT.Intro<F, "I", I1, I2>, HKT.Intro<F, "S", S1, S2>, HKT.Intro<F, "R", R1, R2>, HKT.Intro<F, "E", E1, E2>, A>) => HKT.Kind<F, FC, HKT.Mix<F, "K", [K1, K2]>, HKT.Mix<F, "Q", [Q1, Q2]>, HKT.Mix<F, "W", [W1, W2]>, HKT.Mix<F, "X", [X1, X2]>, HKT.Mix<F, "I", [I1, I2]>, HKT.Mix<F, "S", [S1, S2]>, HKT.Mix<F, "R", [R1, R2]>, HKT.Mix<F, "E", [E1, E2]>, C>;
|
57
|
-
}
|
58
|
-
export interface apS_<F extends HKT, FC = HKT.None> {
|
59
|
-
<K1, Q1, W1, X1, I1, S1, R1, E1, A, BN extends string, K2, Q2, W2, X2, I2, S2, R2, E2, B>(fa: HKT.Kind<F, FC, K1, Q1, W1, X1, I1, S1, R1, E1, A>, name: Exclude<BN, keyof A>, fb: HKT.Kind<F, FC, HKT.Intro<F, "K", K1, K2>, HKT.Intro<F, "Q", Q1, Q2>, HKT.Intro<F, "W", W1, W2>, HKT.Intro<F, "X", X1, X2>, HKT.Intro<F, "I", I1, I2>, HKT.Intro<F, "S", S1, S2>, HKT.Intro<F, "R", R1, R2>, HKT.Intro<F, "E", E1, E2>, B>): HKT.Kind<F, FC, HKT.Mix<F, "K", [K1, K2]>, HKT.Mix<F, "Q", [Q1, Q2]>, HKT.Mix<F, "W", [W1, W2]>, HKT.Mix<F, "X", [X1, X2]>, HKT.Mix<F, "I", [I1, I2]>, HKT.Mix<F, "S", [S1, S2]>, HKT.Mix<F, "R", [R1, R2]>, HKT.Mix<F, "E", [E1, E2]>, {
|
60
|
-
[K in keyof A | BN]: K extends keyof A ? A[K] : B;
|
61
|
-
}>;
|
62
|
-
}
|
63
|
-
export interface apS<F extends HKT, FC = HKT.None> {
|
64
|
-
<BN extends string, K1, Q1, W1, X1, I1, S1, R1, E1, A1, A>(name: Exclude<BN, keyof A>, fb: HKT.Kind<F, FC, K1, Q1, W1, X1, I1, S1, R1, E1, A1>): <K, Q, W, X, I, S, R, E>(fa: HKT.Kind<F, FC, HKT.Intro<F, "K", K1, K>, HKT.Intro<F, "Q", Q1, Q>, HKT.Intro<F, "W", W1, W>, HKT.Intro<F, "X", X1, X>, HKT.Intro<F, "I", I1, I>, HKT.Intro<F, "S", S1, S>, HKT.Intro<F, "R", R1, R>, HKT.Intro<F, "E", E1, E>, A>) => HKT.Kind<F, FC, HKT.Mix<F, "K", [K1, K]>, HKT.Mix<F, "Q", [Q1, Q]>, HKT.Mix<F, "W", [W1, W]>, HKT.Mix<F, "X", [X1, X]>, HKT.Mix<F, "I", [I1, I]>, HKT.Mix<F, "S", [S1, S]>, HKT.Mix<F, "R", [R1, R]>, HKT.Mix<F, "E", [E1, E]>, {
|
65
|
-
[K in keyof A | BN]: K extends keyof A ? A[K] : A1;
|
66
|
-
}>;
|
67
|
-
}
|
68
|
-
export interface sequenceS<F extends HKT, FC = HKT.None> {
|
69
|
-
<KS extends Readonly<Record<string, HKT.Kind<F, FC, HKT.Intro<F, "K", K, any>, HKT.Intro<F, "Q", Q, any>, HKT.Intro<F, "W", W, any>, HKT.Intro<F, "X", X, any>, HKT.Intro<F, "I", I, any>, HKT.Intro<F, "S", S, any>, HKT.Intro<F, "R", R, any>, HKT.Intro<F, "E", E, any>, A>>>, A, K = HKT.Low<F, "K">, Q = HKT.Low<F, "Q">, W = HKT.Low<F, "W">, X = HKT.Low<F, "X">, I = HKT.Low<F, "I">, S = HKT.Low<F, "S">, R = HKT.Low<F, "R">, E = HKT.Low<F, "E">>(r: Object.EnforceNonEmpty<KS> & Readonly<Record<string, HKT.Kind<F, FC, HKT.Intro<F, "K", K, any>, HKT.Intro<F, "Q", Q, any>, HKT.Intro<F, "W", W, any>, HKT.Intro<F, "X", X, any>, HKT.Intro<F, "I", I, any>, HKT.Intro<F, "S", S, any>, HKT.Intro<F, "R", R, any>, HKT.Intro<F, "E", E, any>, A>>>): HKT.Kind<F, FC, InferMixStruct<F, FC, "K", K, KS>, InferMixStruct<F, FC, "Q", Q, KS>, InferMixStruct<F, FC, "W", W, KS>, InferMixStruct<F, FC, "X", X, KS>, InferMixStruct<F, FC, "I", I, KS>, InferMixStruct<F, FC, "S", S, KS>, InferMixStruct<F, FC, "R", R, KS>, InferMixStruct<F, FC, "E", E, KS>, {
|
70
|
-
[K in keyof KS]: HKT.Infer<F, FC, "A", KS[K]>;
|
71
|
-
}>;
|
72
|
-
}
|
21
|
+
export declare function zipWith<F extends HKT, K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B, D>(self: HKT.Kind<F, K1, Q1, W1, X1, I1, S1, R1, E1, A>, that: HKT.Kind<F, HKT.Intro<"K", K1, K2>, HKT.Intro<"Q", Q1, Q2>, HKT.Intro<"W", W1, W2>, HKT.Intro<"X", X1, X2>, HKT.Intro<"I", I1, I2>, HKT.Intro<"S", S1, S2>, HKT.Intro<"R", R1, R2>, HKT.Intro<"E", E1, E2>, B>, f: (a: A, b: B) => D,
|
22
|
+
/** @tsplus auto */ F: Apply<F>): HKT.Kind<F, HKT.Mix<"K", [K1, K2]>, HKT.Mix<"Q", [Q1, Q2]>, HKT.Mix<"W", [W1, W2]>, HKT.Mix<"X", [X1, X2]>, HKT.Mix<"I", [I1, I2]>, HKT.Mix<"S", [S1, S2]>, HKT.Mix<"R", [R1, R2]>, HKT.Mix<"E", [E1, E2]>, D>;
|
73
23
|
/**
|
74
|
-
* @tsplus
|
24
|
+
* @tsplus fluent fncts.Kind ap
|
75
25
|
* @tsplus location "@fncts/base/typeclass/Apply"
|
76
26
|
*/
|
77
|
-
export declare function
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
27
|
+
export declare function ap<F extends HKT, K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B>(fab: HKT.Kind<F, K1, Q1, W1, X1, I1, S1, R1, E1, (a: A) => B>, fa: HKT.Kind<F, HKT.Intro<"K", K1, K2>, HKT.Intro<"Q", Q1, Q2>, HKT.Intro<"W", W1, W2>, HKT.Intro<"X", X1, X2>, HKT.Intro<"I", I1, I2>, HKT.Intro<"S", S1, S2>, HKT.Intro<"R", R1, R2>, HKT.Intro<"E", E1, E2>, A>,
|
28
|
+
/** @tsplus auto */ F: Apply<F>): HKT.Kind<F, HKT.Mix<"K", [K1, K2]>, HKT.Mix<"Q", [Q1, Q2]>, HKT.Mix<"W", [W1, W2]>, HKT.Mix<"X", [X1, X2]>, HKT.Mix<"I", [I1, I2]>, HKT.Mix<"S", [S1, S2]>, HKT.Mix<"R", [R1, R2]>, HKT.Mix<"E", [E1, E2]>, B>;
|
29
|
+
/**
|
30
|
+
* @tsplus fluent fncts.Kind apFirst
|
31
|
+
* @tsplus location "@fncts/base/typeclass/Apply"
|
32
|
+
*/
|
33
|
+
export declare function apFirst<F extends HKT, K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B>(fa: HKT.Kind<F, K1, Q1, W1, X1, I1, S1, R1, E1, A>, fb: HKT.Kind<F, HKT.Intro<"K", K1, K2>, HKT.Intro<"Q", Q1, Q2>, HKT.Intro<"W", W1, W2>, HKT.Intro<"X", X1, X2>, HKT.Intro<"I", I1, I2>, HKT.Intro<"S", S1, S2>, HKT.Intro<"R", R1, R2>, HKT.Intro<"E", E1, E2>, B>,
|
34
|
+
/** @tsplus auto */ F: Apply<F>): HKT.Kind<F, HKT.Mix<"K", [K1, K2]>, HKT.Mix<"Q", [Q1, Q2]>, HKT.Mix<"W", [W1, W2]>, HKT.Mix<"X", [X1, X2]>, HKT.Mix<"I", [I1, I2]>, HKT.Mix<"S", [S1, S2]>, HKT.Mix<"R", [R1, R2]>, HKT.Mix<"E", [E1, E2]>, A>;
|
35
|
+
/**
|
36
|
+
* @tsplus fluent fncts.Kind apSecond
|
37
|
+
* @tsplus location "@fncts/base/typeclass/Apply"
|
38
|
+
*/
|
39
|
+
export declare function apSecond<F extends HKT, K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B>(fa: HKT.Kind<F, K1, Q1, W1, X1, I1, S1, R1, E1, A>, fb: HKT.Kind<F, HKT.Intro<"K", K1, K2>, HKT.Intro<"Q", Q1, Q2>, HKT.Intro<"W", W1, W2>, HKT.Intro<"X", X1, X2>, HKT.Intro<"I", I1, I2>, HKT.Intro<"S", S1, S2>, HKT.Intro<"R", R1, R2>, HKT.Intro<"E", E1, E2>, B>,
|
40
|
+
/** @tsplus auto */ F: Apply<F>): HKT.Kind<F, HKT.Mix<"K", [K1, K2]>, HKT.Mix<"Q", [Q1, Q2]>, HKT.Mix<"W", [W1, W2]>, HKT.Mix<"X", [X1, X2]>, HKT.Mix<"I", [I1, I2]>, HKT.Mix<"S", [S1, S2]>, HKT.Mix<"R", [R1, R2]>, HKT.Mix<"E", [E1, E2]>, B>;
|
41
|
+
export declare function apS<F extends HKT, K1, Q1, W1, X1, I1, S1, R1, E1, A, BN extends string, K2, Q2, W2, X2, I2, S2, R2, E2, B>(fa: HKT.Kind<F, K1, Q1, W1, X1, I1, S1, R1, E1, A>, name: Exclude<BN, keyof A>, fb: HKT.Kind<F, HKT.Intro<"K", K1, K2>, HKT.Intro<"Q", Q1, Q2>, HKT.Intro<"W", W1, W2>, HKT.Intro<"X", X1, X2>, HKT.Intro<"I", I1, I2>, HKT.Intro<"S", S1, S2>, HKT.Intro<"R", R1, R2>, HKT.Intro<"E", E1, E2>, B>,
|
42
|
+
/** @tsplus auto */ F: Apply<F>): HKT.Kind<F, HKT.Mix<"K", [K1, K2]>, HKT.Mix<"Q", [Q1, Q2]>, HKT.Mix<"W", [W1, W2]>, HKT.Mix<"X", [X1, X2]>, HKT.Mix<"I", [I1, I2]>, HKT.Mix<"S", [S1, S2]>, HKT.Mix<"R", [R1, R2]>, HKT.Mix<"E", [E1, E2]>, {
|
43
|
+
[K in keyof A | BN]: K extends keyof A ? A[K] : B;
|
44
|
+
}>;
|
86
45
|
/**
|
87
|
-
* @tsplus static fncts.ApplyOps
|
46
|
+
* @tsplus static fncts.ApplyOps sequenceS
|
88
47
|
* @tsplus location "@fncts/base/typeclass/Apply"
|
89
48
|
*/
|
90
|
-
export declare function
|
49
|
+
export declare function sequenceS<F extends HKT, KS extends Readonly<Record<string, HKT.Kind<F, HKT.Intro<"K", K, any>, HKT.Intro<"Q", Q, any>, HKT.Intro<"W", W, any>, HKT.Intro<"Q", Q, any>, HKT.Intro<"I", I, any>, HKT.Intro<"S", S, any>, HKT.Intro<"R", R, any>, HKT.Intro<"E", E, any>, A>>>, A, K = HKT.Low<"K">, Q = HKT.Low<"Q">, W = HKT.Low<"W">, I = HKT.Low<"I">, S = HKT.Low<"S">, R = HKT.Low<"R">, E = HKT.Low<"E">>(r: Object.EnforceNonEmpty<KS> & Readonly<Record<string, HKT.Kind<F, HKT.Intro<"K", K, any>, HKT.Intro<"Q", Q, any>, HKT.Intro<"W", W, any>, HKT.Intro<"Q", Q, any>, HKT.Intro<"I", I, any>, HKT.Intro<"S", S, any>, HKT.Intro<"R", R, any>, HKT.Intro<"E", E, any>, A>>>,
|
50
|
+
/** @tsplus auto */ F: Apply<F>): HKT.Kind<F, InferMixStruct<F, "K", K, KS>, InferMixStruct<F, "Q", Q, KS>, InferMixStruct<F, "W", W, KS>, InferMixStruct<F, "Q", Q, KS>, InferMixStruct<F, "I", I, KS>, InferMixStruct<F, "S", S, KS>, InferMixStruct<F, "R", R, KS>, InferMixStruct<F, "E", E, KS>, {
|
51
|
+
[K in keyof KS]: HKT.Infer<F, "A", KS[K]>;
|
52
|
+
}>;
|
53
|
+
export declare function sequenceT<F extends HKT, KT extends readonly [
|
54
|
+
HKT.Kind<F, HKT.Intro<"K", K, any>, HKT.Intro<"Q", Q, any>, HKT.Intro<"W", W, any>, HKT.Intro<"Q", Q, any>, HKT.Intro<"I", I, any>, HKT.Intro<"S", S, any>, HKT.Intro<"R", R, any>, HKT.Intro<"E", E, any>, unknown>,
|
55
|
+
...ReadonlyArray<HKT.Kind<F, HKT.Intro<"K", K, any>, HKT.Intro<"Q", Q, any>, HKT.Intro<"W", W, any>, HKT.Intro<"Q", Q, any>, HKT.Intro<"I", I, any>, HKT.Intro<"S", S, any>, HKT.Intro<"R", R, any>, HKT.Intro<"E", E, any>, unknown>>
|
56
|
+
], K = HKT.Low<"K">, Q = HKT.Low<"Q">, W = HKT.Low<"W">, I = HKT.Low<"I">, S = HKT.Low<"S">, R = HKT.Low<"R">, E = HKT.Low<"E">>(t: [...KT],
|
57
|
+
/** @tsplus auto */ F: Apply<F>): HKT.Kind<F, InferMixTuple<F, "K", K, KT>, InferMixTuple<F, "Q", Q, KT>, InferMixTuple<F, "W", W, KT>, InferMixTuple<F, "Q", Q, KT>, InferMixTuple<F, "I", I, KT>, InferMixTuple<F, "S", S, KT>, InferMixTuple<F, "R", R, KT>, InferMixTuple<F, "E", E, KT>, {
|
58
|
+
[K in keyof KT]: HKT.Infer<F, "A", KT[K]>;
|
59
|
+
}>;
|
91
60
|
/**
|
92
61
|
* @internal
|
93
62
|
*/
|
94
|
-
declare type InferMixStruct<F extends HKT,
|
95
|
-
[K in keyof KS]: HKT.Infer<F,
|
63
|
+
declare type InferMixStruct<F extends HKT, P extends HKT.ParamName, T, KS> = HKT.MixStruct<P, T, {
|
64
|
+
[K in keyof KS]: HKT.Infer<F, P, KS[K]>;
|
96
65
|
}>;
|
97
66
|
/**
|
98
67
|
* @internal
|
99
68
|
*/
|
100
|
-
declare type InferMixTuple<F extends HKT,
|
101
|
-
[K in keyof KT & number]: HKT.Infer<F,
|
69
|
+
declare type InferMixTuple<F extends HKT, P extends HKT.ParamName, T, KT> = HKT.MixStruct<P, T, {
|
70
|
+
[K in keyof KT & number]: HKT.Infer<F, P, KT[K]>;
|
102
71
|
}>;
|
103
72
|
export {};
|
package/typeclass/Chain.d.ts
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
import { HKT } from "@fncts/typelevel/HKT";
|
2
|
-
import type {
|
3
|
-
|
4
|
-
|
5
|
-
readonly flatMap_: flatMap_<F, FC>;
|
6
|
-
readonly flatMap: flatMap<F, FC>;
|
7
|
-
readonly flatten: flatten<F, FC>;
|
8
|
-
readonly tap_: tap_<F, FC>;
|
9
|
-
readonly tap: tap<F, FC>;
|
2
|
+
import type { Functor } from "@fncts/base/typeclass/Functor";
|
3
|
+
export interface FlatMap<F extends HKT> extends Functor<F> {
|
4
|
+
flatMap<K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B>(ma: HKT.Kind<F, K1, Q1, W1, X1, I1, S1, R1, E1, A>, f: (a: A) => HKT.Kind<F, HKT.Intro<"K", K1, K2>, HKT.Intro<"Q", Q1, Q2>, HKT.Intro<"W", W1, W2>, HKT.Intro<"X", X1, X2>, HKT.Intro<"I", I1, I2>, HKT.Intro<"S", S1, S2>, HKT.Intro<"R", R1, R2>, HKT.Intro<"E", E1, E2>, B>): HKT.Kind<F, HKT.Mix<"K", [K1, K2]>, HKT.Mix<"Q", [Q1, Q2]>, HKT.Mix<"W", [W1, W2]>, HKT.Mix<"X", [X1, X2]>, HKT.Mix<"I", [I1, I2]>, HKT.Mix<"S", [S1, S2]>, HKT.Mix<"R", [R1, R2]>, HKT.Mix<"E", [E1, E2]>, B>;
|
10
5
|
}
|
11
6
|
/**
|
12
7
|
* @tsplus type fncts.FlatMapOps
|
@@ -14,26 +9,21 @@ export interface FlatMap<F extends HKT, FC = HKT.None> extends Functor<F, FC> {
|
|
14
9
|
export interface FlatMapOps {
|
15
10
|
}
|
16
11
|
export declare const FlatMap: FlatMapOps;
|
17
|
-
export declare type ChainMin<F extends HKT, FC = HKT.None> = {
|
18
|
-
readonly flatMap_: flatMap_<F, FC>;
|
19
|
-
} & FunctorMin<F, FC>;
|
20
12
|
/**
|
21
|
-
* @tsplus
|
13
|
+
* @tsplus fluent fncts.Kind flatMap
|
22
14
|
* @tsplus location "@fncts/base/typeclass/Chain"
|
23
15
|
*/
|
24
|
-
export declare function
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
<K2, Q2, W2, X2, I2, S2, R2, E2, B, A>(f: (a: A) => HKT.Kind<F, TC, K2, Q2, W2, X2, I2, S2, R2, E2, B>): <K1, Q1, W1, X1, I1, S1, R1, E1>(ma: HKT.Kind<F, TC, HKT.Intro<F, "K", K2, K1>, HKT.Intro<F, "Q", Q2, Q1>, HKT.Intro<F, "W", W2, W1>, HKT.Intro<F, "X", X2, X1>, HKT.Intro<F, "I", I2, I1>, HKT.Intro<F, "S", S2, S1>, HKT.Intro<F, "R", R2, R1>, HKT.Intro<F, "E", E2, E1>, A>) => HKT.Kind<F, TC, HKT.Mix<F, "K", [K2, K1]>, HKT.Mix<F, "Q", [Q2, Q1]>, HKT.Mix<F, "W", [W2, W1]>, HKT.Mix<F, "X", [X2, X1]>, HKT.Mix<F, "I", [I2, I1]>, HKT.Mix<F, "S", [S2, S1]>, HKT.Mix<F, "R", [R2, R1]>, HKT.Mix<F, "E", [E2, E1]>, A>;
|
39
|
-
}
|
16
|
+
export declare function flatMap<F extends HKT, K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B>(ma: HKT.Kind<F, K1, Q1, W1, X1, I1, S1, R1, E1, A>, f: (a: A) => HKT.Kind<F, HKT.Intro<"K", K1, K2>, HKT.Intro<"Q", Q1, Q2>, HKT.Intro<"W", W1, W2>, HKT.Intro<"X", X1, X2>, HKT.Intro<"I", I1, I2>, HKT.Intro<"S", S1, S2>, HKT.Intro<"R", R1, R2>, HKT.Intro<"E", E1, E2>, B>,
|
17
|
+
/** @tsplus auto */ F: FlatMap<F>): HKT.Kind<F, HKT.Mix<"K", [K1, K2]>, HKT.Mix<"Q", [Q1, Q2]>, HKT.Mix<"W", [W1, W2]>, HKT.Mix<"X", [X1, X2]>, HKT.Mix<"I", [I1, I2]>, HKT.Mix<"S", [S1, S2]>, HKT.Mix<"R", [R1, R2]>, HKT.Mix<"E", [E1, E2]>, B>;
|
18
|
+
/**
|
19
|
+
* @tsplus fluent fncts.Kind flatten
|
20
|
+
* @tsplus location "@fncts/base/typeclass/Chain"
|
21
|
+
*/
|
22
|
+
export declare function flatten<F extends HKT, K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2>(mma: HKT.Kind<F, K2, Q2, W2, X2, I2, S2, R2, E2, HKT.Kind<F, HKT.Intro<"K", K2, K1>, HKT.Intro<"Q", Q2, Q1>, HKT.Intro<"W", W2, W1>, HKT.Intro<"X", X2, X1>, HKT.Intro<"I", I2, I1>, HKT.Intro<"S", S2, S1>, HKT.Intro<"R", R2, R1>, HKT.Intro<"E", E2, E1>, A>>,
|
23
|
+
/** @tsplus auto */ F: FlatMap<F>): HKT.Kind<F, HKT.Mix<"K", [K2, K1]>, HKT.Mix<"Q", [Q2, Q1]>, HKT.Mix<"W", [W2, W1]>, HKT.Mix<"X", [X2, X1]>, HKT.Mix<"I", [I2, I1]>, HKT.Mix<"S", [S2, S1]>, HKT.Mix<"R", [R2, R1]>, HKT.Mix<"E", [E2, E1]>, A>;
|
24
|
+
/**
|
25
|
+
* @tsplus fluent fncts.Kind tap
|
26
|
+
* @tsplus location "@fncts/base/typeclass/Chain"
|
27
|
+
*/
|
28
|
+
export declare function tap<F extends HKT, K1, Q1, W1, X1, I1, S1, R1, E1, A, K2, Q2, W2, X2, I2, S2, R2, E2, B>(ma: HKT.Kind<F, K1, Q1, W1, X1, I1, S1, R1, E1, A>, f: (a: A) => HKT.Kind<F, HKT.Intro<"K", K1, K2>, HKT.Intro<"Q", Q1, Q2>, HKT.Intro<"W", W1, W2>, HKT.Intro<"X", X1, X2>, HKT.Intro<"I", I1, I2>, HKT.Intro<"S", S1, S2>, HKT.Intro<"R", R1, R2>, HKT.Intro<"E", E1, E2>, B>,
|
29
|
+
/** @tsplus auto */ F: FlatMap<F>): HKT.Kind<F, HKT.Mix<"K", [K1, K2]>, HKT.Mix<"Q", [Q1, Q2]>, HKT.Mix<"W", [W1, W2]>, HKT.Mix<"X", [X1, X2]>, HKT.Mix<"I", [I1, I2]>, HKT.Mix<"S", [S1, S2]>, HKT.Mix<"R", [R1, R2]>, HKT.Mix<"E", [E1, E2]>, A>;
|
package/typeclass/Closure.d.ts
CHANGED
@@ -2,8 +2,7 @@
|
|
2
2
|
* @tsplus type fncts.Closure
|
3
3
|
*/
|
4
4
|
export interface Closure<A> {
|
5
|
-
readonly
|
6
|
-
readonly combine: (y: A) => (x: A) => A;
|
5
|
+
readonly combine: (x: A, y: A) => A;
|
7
6
|
}
|
8
7
|
/**
|
9
8
|
* @tsplus type fncts.ClosureOps
|
@@ -11,17 +10,8 @@ export interface Closure<A> {
|
|
11
10
|
export interface ClosureOps {
|
12
11
|
}
|
13
12
|
export declare const Closure: ClosureOps;
|
14
|
-
export declare type ClosureMin<A> = {
|
15
|
-
combine_: combine_<A>;
|
16
|
-
};
|
17
13
|
/**
|
18
14
|
* @tsplus static fncts.ClosureOps __call
|
19
15
|
* @tsplus location "@fncts/base/typeclass/Closure"
|
20
16
|
*/
|
21
|
-
export declare function mkClosure<A>(F:
|
22
|
-
export interface combine_<A> {
|
23
|
-
(x: A, y: A): A;
|
24
|
-
}
|
25
|
-
export interface combine<A> {
|
26
|
-
(y: A): (x: A) => A;
|
27
|
-
}
|
17
|
+
export declare function mkClosure<A>(F: Closure<A>): Closure<A>;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* @tsplus type fncts.Eq
|
3
|
+
*/
|
4
|
+
export interface Eq<A> {
|
5
|
+
readonly equals: (x: A, y: A) => boolean;
|
6
|
+
}
|
7
|
+
/**
|
8
|
+
* @tsplus type fncts.EqOps
|
9
|
+
*/
|
10
|
+
export interface EqOps {
|
11
|
+
}
|
12
|
+
export declare const Eq: EqOps;
|
13
|
+
/**
|
14
|
+
* @tsplus static fncts.EqOps __call
|
15
|
+
* @tsplus location "@fncts/base/typeclass/Eq/definition"
|
16
|
+
*/
|
17
|
+
export declare function mkEq<A>(E: Eq<A>): Eq<A>;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import type { Check } from "@fncts/typelevel/Check";
|
2
|
+
import type { OptionalKeys, RequiredKeys } from "@fncts/typelevel/Object";
|
3
|
+
import { Eq } from "@fncts/base/typeclass/Eq/definition";
|
4
|
+
/**
|
5
|
+
* @tsplus derive fncts.Eq lazy
|
6
|
+
* @tsplus location "@fncts/base/typeclass/Eq/derivations"
|
7
|
+
*/
|
8
|
+
export declare function deriveLazy<A>(fn: (_: Eq<A>) => Eq<A>): Eq<A>;
|
9
|
+
/**
|
10
|
+
* @tsplus derive fncts.Eq<_> 20
|
11
|
+
* @tsplus location "@fncts/base/typeclass/Eq/derivations"
|
12
|
+
*/
|
13
|
+
export declare function deriveStruct<A extends Record<string, any>>(...[requiredFields, optionalFields]: Check<Check.IsStruct<A>> extends Check.True ? [
|
14
|
+
...[
|
15
|
+
requiredFields: {
|
16
|
+
[K in RequiredKeys<A>]: Eq<A[K]>;
|
17
|
+
}
|
18
|
+
],
|
19
|
+
...([OptionalKeys<A>] extends [never] ? [] : [
|
20
|
+
optionalFields: {
|
21
|
+
[K in OptionalKeys<A>]: Eq<NonNullable<A[K]>>;
|
22
|
+
}
|
23
|
+
])
|
24
|
+
] : never): Eq<A>;
|