@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
@@ -0,0 +1,52 @@
|
|
1
|
+
import { assert } from "@fncts/base/util/assert";
|
2
|
+
import { isArray } from "@fncts/base/util/predicates";
|
3
|
+
|
4
|
+
export const ZippedTypeId = Symbol.for("fncts.Zipped");
|
5
|
+
export type ZippedTypeId = typeof ZippedTypeId;
|
6
|
+
|
7
|
+
export type Zipped<A extends Array<any>> = Readonly<A> & { readonly [ZippedTypeId]: ZippedTypeId };
|
8
|
+
|
9
|
+
export declare namespace Zipped {
|
10
|
+
type Make<A, B> = [A] extends [Zipped<infer X>]
|
11
|
+
? [B] extends [Zipped<infer Y>]
|
12
|
+
? Zipped<[...X, ...Y]>
|
13
|
+
: Zipped<[...X, B]>
|
14
|
+
: [B] extends [Zipped<infer Y>]
|
15
|
+
? Zipped<[A, ...Y]>
|
16
|
+
: Zipped<[A, B]>;
|
17
|
+
}
|
18
|
+
|
19
|
+
/**
|
20
|
+
* @tsplus type fncts.ZippedOps
|
21
|
+
*/
|
22
|
+
export interface ZippedOps {}
|
23
|
+
|
24
|
+
export const Zipped: ZippedOps = {};
|
25
|
+
|
26
|
+
/**
|
27
|
+
* @tsplus static fncts.ZippedOps is
|
28
|
+
*/
|
29
|
+
export function isZipped(a: unknown): a is Zipped<Array<unknown>> {
|
30
|
+
return isArray(a) && ZippedTypeId in a;
|
31
|
+
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* @tsplus static fncts.ZippedOps __call
|
35
|
+
*/
|
36
|
+
export function make<A, B>(a: A, b: B): Zipped.Make<A, B> {
|
37
|
+
let zipped: Zipped<any>;
|
38
|
+
if (isZipped(a)) {
|
39
|
+
if (isZipped(b)) {
|
40
|
+
zipped = unsafeCoerce([...a, ...b]);
|
41
|
+
} else {
|
42
|
+
zipped = unsafeCoerce([...a, b]);
|
43
|
+
}
|
44
|
+
} else if (isZipped(b)) {
|
45
|
+
zipped = unsafeCoerce([a, ...b]);
|
46
|
+
} else {
|
47
|
+
zipped = unsafeCoerce([a, b]);
|
48
|
+
}
|
49
|
+
// @ts-expect-error
|
50
|
+
zipped[ZippedTypeId] = ZippedTypeId;
|
51
|
+
return unsafeCoerce(zipped);
|
52
|
+
}
|
@@ -31,6 +31,14 @@ export function tuple<A extends ReadonlyArray<unknown>>(...as: A): A {
|
|
31
31
|
}
|
32
32
|
|
33
33
|
/**
|
34
|
+
* @tsplus getter fncts.Function tupled
|
35
|
+
*/
|
36
|
+
export function tupled<A, B, C>(f: (a: A, b: B) => C): (_: readonly [A, B]) => C {
|
37
|
+
return ([a, b]) => f(a, b);
|
38
|
+
}
|
39
|
+
|
40
|
+
/**
|
41
|
+
* @tsplus fluent global unsafeCoerce
|
34
42
|
* @tsplus static fncts.FunctionOps unsafeCoerce
|
35
43
|
* @tsplus macro identity
|
36
44
|
*/
|
@@ -1,7 +1,17 @@
|
|
1
|
+
import type { Check } from "@fncts/typelevel/Check";
|
2
|
+
|
1
3
|
import * as P from "@fncts/base/typeclass";
|
2
4
|
|
3
5
|
/**
|
4
|
-
* @tsplus implicit
|
5
6
|
* @tsplus static fncts.globalOps Guard
|
6
7
|
*/
|
7
8
|
export const Guard: P.Guard<{}> = P.Guard(isObject);
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @tsplus derive fncts.Guard<_> 10
|
12
|
+
*/
|
13
|
+
export function deriveGuard<A extends {}>(
|
14
|
+
..._: Check<Check.IsEqual<A, {}>> extends Check.True ? [] : never
|
15
|
+
): P.Guard<A> {
|
16
|
+
return P.Guard((u): u is A => typeof u === "object" && u !== null);
|
17
|
+
}
|
package/_src/data/string/api.ts
CHANGED
@@ -175,7 +175,7 @@ export const under = Pipeable(under_);
|
|
175
175
|
/**
|
176
176
|
* Join newline-separated strings together.
|
177
177
|
*
|
178
|
-
* @tsplus getter fncts.
|
178
|
+
* @tsplus getter fncts.ImmutableArray unlines
|
179
179
|
*/
|
180
180
|
export function unlines(as: ReadonlyArray<string>): string {
|
181
181
|
return as.join("\n");
|
package/_src/data.ts
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
// codegen:start { preset: type-barrel, include: ./data/*.ts }
|
2
|
+
export type {} from "./data/bigint.js";
|
3
|
+
export type {} from "./data/boolean.js";
|
4
|
+
export type {} from "./data/Branded.js";
|
5
|
+
export type {} from "./data/Byte.js";
|
6
|
+
export type {} from "./data/CaseClass.js";
|
7
|
+
export type {} from "./data/Cause.js";
|
8
|
+
export type {} from "./data/Const.js";
|
9
|
+
export type {} from "./data/DecodeError.js";
|
10
|
+
export type {} from "./data/Decoder.js";
|
11
|
+
export type {} from "./data/Duration.js";
|
12
|
+
export type {} from "./data/Either.js";
|
13
|
+
export type {} from "./data/Environment.js";
|
14
|
+
export type {} from "./data/exceptions.js";
|
15
|
+
export type {} from "./data/ExecutionStrategy.js";
|
16
|
+
export type {} from "./data/Exit.js";
|
17
|
+
export type {} from "./data/FiberId.js";
|
18
|
+
export type {} from "./data/function.js";
|
19
|
+
export type {} from "./data/Identity.js";
|
20
|
+
export type {} from "./data/Interval.js";
|
21
|
+
export type {} from "./data/Intervals.js";
|
22
|
+
export type {} from "./data/Maybe.js";
|
23
|
+
export type {} from "./data/Newtype.js";
|
24
|
+
export type {} from "./data/number.js";
|
25
|
+
export type {} from "./data/object.js";
|
26
|
+
export type {} from "./data/Patch.js";
|
27
|
+
export type {} from "./data/Predicate.js";
|
28
|
+
export type {} from "./data/Refinement.js";
|
29
|
+
export type {} from "./data/string.js";
|
30
|
+
export type {} from "./data/Tag.js";
|
31
|
+
export type {} from "./data/These.js";
|
32
|
+
export type {} from "./data/Trace.js";
|
33
|
+
export type {} from "./data/TraceElement.js";
|
34
|
+
export type {} from "./data/Zipped.js";
|
35
|
+
// codegen:end
|
package/_src/global.ts
ADDED
@@ -0,0 +1,252 @@
|
|
1
|
+
/**
|
2
|
+
* @tsplus global
|
3
|
+
*/
|
4
|
+
import type {} from "@fncts/base";
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @tsplus global
|
8
|
+
*/
|
9
|
+
import {} from "@fncts/base/collection/compat/Array";
|
10
|
+
/**
|
11
|
+
* @tsplus global
|
12
|
+
*/
|
13
|
+
import { Conc, ConcBuilder } from "@fncts/base/collection/immutable/Conc";
|
14
|
+
/**
|
15
|
+
* @tsplus global
|
16
|
+
*/
|
17
|
+
import { Dictionary } from "@fncts/base/collection/immutable/Dictionary/definition";
|
18
|
+
/**
|
19
|
+
* @tsplus global
|
20
|
+
*/
|
21
|
+
import { HashMap } from "@fncts/base/collection/immutable/HashMap/definition";
|
22
|
+
/**
|
23
|
+
* @tsplus global
|
24
|
+
*/
|
25
|
+
import { HashSet } from "@fncts/base/collection/immutable/HashSet/definition";
|
26
|
+
/**
|
27
|
+
* @tsplus global
|
28
|
+
*/
|
29
|
+
import { ImmutableArray } from "@fncts/base/collection/immutable/ImmutableArray/definition";
|
30
|
+
/**
|
31
|
+
* @tsplus global
|
32
|
+
*/
|
33
|
+
import {
|
34
|
+
ImmutableNonEmptyArray,
|
35
|
+
NonEmptyArray,
|
36
|
+
ReadonlyNonEmptyArray,
|
37
|
+
} from "@fncts/base/collection/immutable/ImmutableNonEmptyArray/definition";
|
38
|
+
/**
|
39
|
+
* @tsplus global
|
40
|
+
*/
|
41
|
+
import { Cons, List, Nil } from "@fncts/base/collection/immutable/List/definition";
|
42
|
+
/**
|
43
|
+
* @tsplus global
|
44
|
+
*/
|
45
|
+
import { Queue as ImmutableQueue } from "@fncts/base/collection/immutable/Queue/definition";
|
46
|
+
/**
|
47
|
+
* @tsplus global
|
48
|
+
*/
|
49
|
+
import { RoseTree } from "@fncts/base/collection/immutable/RoseTree";
|
50
|
+
/**
|
51
|
+
* @tsplus global
|
52
|
+
*/
|
53
|
+
import { SortedMap } from "@fncts/base/collection/immutable/SortedMap/definition";
|
54
|
+
/**
|
55
|
+
* @tsplus global
|
56
|
+
*/
|
57
|
+
import { Vector } from "@fncts/base/collection/immutable/Vector";
|
58
|
+
/**
|
59
|
+
* @tsplus global
|
60
|
+
*/
|
61
|
+
import { Iterable } from "@fncts/base/collection/Iterable/definition";
|
62
|
+
/**
|
63
|
+
* @tsplus global
|
64
|
+
*/
|
65
|
+
import { HashMap as MutableHashMap } from "@fncts/base/collection/mutable/HashMap";
|
66
|
+
/**
|
67
|
+
* @tsplus global
|
68
|
+
*/
|
69
|
+
import { HashSet as MutableHashSet } from "@fncts/base/collection/mutable/HashSet";
|
70
|
+
/**
|
71
|
+
* @tsplus global
|
72
|
+
*/
|
73
|
+
import { ListBuffer } from "@fncts/base/collection/mutable/ListBuffer";
|
74
|
+
/**
|
75
|
+
* @tsplus global
|
76
|
+
*/
|
77
|
+
import { Eval } from "@fncts/base/control/Eval/definition";
|
78
|
+
/**
|
79
|
+
* @tsplus global
|
80
|
+
*/
|
81
|
+
import { LazyValue } from "@fncts/base/control/LazyValue";
|
82
|
+
/**
|
83
|
+
* @tsplus global
|
84
|
+
*/
|
85
|
+
import { Z } from "@fncts/base/control/Z/definition";
|
86
|
+
/**
|
87
|
+
* @tsplus global
|
88
|
+
*/
|
89
|
+
import { Byte } from "@fncts/base/data/Byte";
|
90
|
+
/**
|
91
|
+
* @tsplus global
|
92
|
+
*/
|
93
|
+
import { CaseClass } from "@fncts/base/data/CaseClass";
|
94
|
+
/**
|
95
|
+
* @tsplus global
|
96
|
+
*/
|
97
|
+
import { Cause } from "@fncts/base/data/Cause/definition";
|
98
|
+
/**
|
99
|
+
* @tsplus global
|
100
|
+
*/
|
101
|
+
import { Const } from "@fncts/base/data/Const/definition";
|
102
|
+
/**
|
103
|
+
* @tsplus global
|
104
|
+
*/
|
105
|
+
import { Datum } from "@fncts/base/data/Datum/definition";
|
106
|
+
/**
|
107
|
+
* @tsplus global
|
108
|
+
*/
|
109
|
+
import { DatumEither } from "@fncts/base/data/DatumEither/definition";
|
110
|
+
/**
|
111
|
+
* @tsplus global
|
112
|
+
*/
|
113
|
+
import { Decoder } from "@fncts/base/data/Decoder";
|
114
|
+
/**
|
115
|
+
* @tsplus global
|
116
|
+
*/
|
117
|
+
import { Duration } from "@fncts/base/data/Duration/definition";
|
118
|
+
/**
|
119
|
+
* @tsplus global
|
120
|
+
*/
|
121
|
+
import { Either } from "@fncts/base/data/Either/definition";
|
122
|
+
/**
|
123
|
+
* @tsplus global
|
124
|
+
*/
|
125
|
+
import { Environment } from "@fncts/base/data/Environment/definition";
|
126
|
+
/**
|
127
|
+
* @tsplus global
|
128
|
+
*/
|
129
|
+
import {
|
130
|
+
ArrayIndexOutOfBoundsError,
|
131
|
+
IllegalArgumentError,
|
132
|
+
IllegalStateError,
|
133
|
+
IndexOutOfBoundsError,
|
134
|
+
InterruptedException,
|
135
|
+
InvalidCapacityError,
|
136
|
+
isInterruptedException,
|
137
|
+
isInvalidCapacityError,
|
138
|
+
NoSuchElementError,
|
139
|
+
} from "@fncts/base/data/exceptions";
|
140
|
+
/**
|
141
|
+
* @tsplus global
|
142
|
+
*/
|
143
|
+
import { ExecutionStrategy } from "@fncts/base/data/ExecutionStrategy";
|
144
|
+
/**
|
145
|
+
* @tsplus global
|
146
|
+
*/
|
147
|
+
import { Exit } from "@fncts/base/data/Exit/definition";
|
148
|
+
/**
|
149
|
+
* @tsplus global
|
150
|
+
*/
|
151
|
+
import { FiberId } from "@fncts/base/data/FiberId/definition";
|
152
|
+
/**
|
153
|
+
* @tsplus global
|
154
|
+
*/
|
155
|
+
import { unsafeCoerce } from "@fncts/base/data/function/api";
|
156
|
+
/**
|
157
|
+
* @tsplus global
|
158
|
+
*/
|
159
|
+
import { Lazy } from "@fncts/base/data/function/definition";
|
160
|
+
/**
|
161
|
+
* @tsplus global
|
162
|
+
*/
|
163
|
+
import { Identity } from "@fncts/base/data/Identity/definition";
|
164
|
+
/**
|
165
|
+
* @tsplus global
|
166
|
+
*/
|
167
|
+
import { Interval } from "@fncts/base/data/Interval";
|
168
|
+
/**
|
169
|
+
* @tsplus global
|
170
|
+
*/
|
171
|
+
import { Intervals } from "@fncts/base/data/Intervals";
|
172
|
+
/**
|
173
|
+
* @tsplus global
|
174
|
+
*/
|
175
|
+
import { Just, Maybe, MaybeTag, Nothing } from "@fncts/base/data/Maybe/definition";
|
176
|
+
/**
|
177
|
+
* @tsplus global
|
178
|
+
*/
|
179
|
+
import { Newtype, NewtypeIso } from "@fncts/base/data/Newtype";
|
180
|
+
/**
|
181
|
+
* @tsplus global
|
182
|
+
*/
|
183
|
+
import {} from "@fncts/base/data/number/definition";
|
184
|
+
import {} from "@fncts/base/data/object/definition";
|
185
|
+
/**
|
186
|
+
* @tsplus global
|
187
|
+
*/
|
188
|
+
import {} from "@fncts/base/data/object/definition";
|
189
|
+
/**
|
190
|
+
* @tsplus global
|
191
|
+
*/
|
192
|
+
import { Predicate, PredicateWithIndex } from "@fncts/base/data/Predicate/definition";
|
193
|
+
/**
|
194
|
+
* @tsplus global
|
195
|
+
*/
|
196
|
+
import { Refinement, RefinementWithIndex } from "@fncts/base/data/Refinement/definition";
|
197
|
+
/**
|
198
|
+
* @tsplus global
|
199
|
+
*/
|
200
|
+
import {} from "@fncts/base/data/string/definition";
|
201
|
+
/**
|
202
|
+
* @tsplus global
|
203
|
+
*/
|
204
|
+
import { Struct } from "@fncts/base/data/Struct/definition";
|
205
|
+
/**
|
206
|
+
* @tsplus global
|
207
|
+
*/
|
208
|
+
import { Tag } from "@fncts/base/data/Tag/definition";
|
209
|
+
/**
|
210
|
+
* @tsplus global
|
211
|
+
*/
|
212
|
+
import { These } from "@fncts/base/data/These";
|
213
|
+
/**
|
214
|
+
* @tsplus global
|
215
|
+
*/
|
216
|
+
import { Trace } from "@fncts/base/data/Trace/definition";
|
217
|
+
/**
|
218
|
+
* @tsplus global
|
219
|
+
*/
|
220
|
+
import { TraceElement } from "@fncts/base/data/TraceElement/definition";
|
221
|
+
/**
|
222
|
+
* @tsplus global
|
223
|
+
*/
|
224
|
+
import { Zipped } from "@fncts/base/data/Zipped";
|
225
|
+
/**
|
226
|
+
* @tsplus global
|
227
|
+
*/
|
228
|
+
import { Stack } from "@fncts/base/internal/Stack";
|
229
|
+
/**
|
230
|
+
* @tsplus global
|
231
|
+
*/
|
232
|
+
import { Equatable } from "@fncts/base/typeclass/Equatable";
|
233
|
+
/**
|
234
|
+
* @tsplus global
|
235
|
+
*/
|
236
|
+
import { Guard } from "@fncts/base/typeclass/Guard";
|
237
|
+
/**
|
238
|
+
* @tsplus global
|
239
|
+
*/
|
240
|
+
import { Has } from "@fncts/base/typeclass/Has";
|
241
|
+
/**
|
242
|
+
* @tsplus global
|
243
|
+
*/
|
244
|
+
import { Hashable } from "@fncts/base/typeclass/Hashable";
|
245
|
+
/**
|
246
|
+
* @tsplus global
|
247
|
+
*/
|
248
|
+
import { hasTypeId, isByte, isObject } from "@fncts/base/util/predicates";
|
249
|
+
/**
|
250
|
+
* @tsplus global
|
251
|
+
*/
|
252
|
+
import { HKT } from "@fncts/typelevel/HKT";
|
package/_src/index.ts
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
export type {} from "./collection.js";
|
2
|
+
export type {} from "./control.js";
|
3
|
+
export type {} from "./data.js";
|
4
|
+
export type {} from "./json.js";
|
5
|
+
export type {} from "./optics.js";
|
6
|
+
export type {} from "./typeclass.js";
|
7
|
+
export type {} from "./types.js";
|
8
|
+
export type {} from "./util.js";
|
package/_src/json.ts
ADDED
@@ -37,10 +37,10 @@ export function mkPOptional<S, T, A, B>(F: POptionalMin<S, T, A, B>): POptional<
|
|
37
37
|
modifyMaybe_,
|
38
38
|
modifyMaybe: (f) => (s) => modifyMaybe_(s, f),
|
39
39
|
...PTraversal<S, T, A, B>({
|
40
|
-
modifyA: (s, f
|
40
|
+
modifyA: (A) => (s, f) =>
|
41
41
|
F.getOrModify(s).match(
|
42
42
|
(t) => A.pure(t),
|
43
|
-
(a) => f(a)
|
43
|
+
(a) => A.map(f(a), (b) => F.replace_(s, b)),
|
44
44
|
),
|
45
45
|
}),
|
46
46
|
};
|
@@ -8,6 +8,6 @@ export function compose_<S, T, A, B, C, D>(
|
|
8
8
|
that: PTraversal<A, B, C, D>,
|
9
9
|
): PTraversal<S, T, C, D> {
|
10
10
|
return PTraversal<S, T, C, D>({
|
11
|
-
modifyA: (s, f
|
11
|
+
modifyA: (F) => (s, f) => self.modifyA(F)(s, (a) => that.modifyA(F)(a, f)),
|
12
12
|
});
|
13
13
|
}
|
@@ -5,20 +5,20 @@ import { PTraversal } from "@fncts/base/optics/Traversal/definition";
|
|
5
5
|
/**
|
6
6
|
* @tsplus static fncts.optics.PTraversalOps fromTraversable
|
7
7
|
*/
|
8
|
-
export function fromTraversable<
|
8
|
+
export function fromTraversable<F extends HKT, FC = HKT.None>(T: P.Traversable<F, FC>) {
|
9
9
|
return <
|
10
10
|
A,
|
11
11
|
B,
|
12
|
-
K = HKT.Low<"K">,
|
13
|
-
Q = HKT.Low<"Q">,
|
14
|
-
W = HKT.Low<"W">,
|
15
|
-
X = HKT.Low<"X">,
|
16
|
-
I = HKT.Low<"I">,
|
17
|
-
S = HKT.Low<"S">,
|
18
|
-
R = HKT.Low<"R">,
|
19
|
-
E = HKT.Low<"E">,
|
12
|
+
K = HKT.Low<F, "K">,
|
13
|
+
Q = HKT.Low<F, "Q">,
|
14
|
+
W = HKT.Low<F, "W">,
|
15
|
+
X = HKT.Low<F, "X">,
|
16
|
+
I = HKT.Low<F, "I">,
|
17
|
+
S = HKT.Low<F, "S">,
|
18
|
+
R = HKT.Low<F, "R">,
|
19
|
+
E = HKT.Low<F, "E">,
|
20
20
|
>() =>
|
21
|
-
PTraversal<HKT.Kind<
|
22
|
-
modifyA: (s, f
|
21
|
+
PTraversal<HKT.Kind<F, FC, K, Q, W, X, I, S, R, E, A>, HKT.Kind<F, FC, K, Q, W, X, I, S, R, E, B>, A, B>({
|
22
|
+
modifyA: (F) => (s, f) => T.traverse(s)(F)(f),
|
23
23
|
});
|
24
24
|
}
|
@@ -7,19 +7,21 @@ import { PSetter } from "@fncts/base/optics/Setter";
|
|
7
7
|
* @tsplus type fncts.optics.PTraversal
|
8
8
|
*/
|
9
9
|
export interface PTraversal<S, T, A, B> extends PSetter<S, T, A, B>, Fold<S, A> {
|
10
|
-
modifyA<F extends HKT,
|
10
|
+
modifyA: <F extends HKT, FC = HKT.None>(
|
11
|
+
F: Applicative<F, FC>,
|
12
|
+
) => <K, Q, W, X, I, _S, R, E>(
|
11
13
|
s: S,
|
12
|
-
f: (a: A) => HKT.Kind<F, K, Q, W, X, I, _S, R, E, B>,
|
13
|
-
|
14
|
-
): HKT.Kind<F, K, Q, W, X, I, _S, R, E, T>;
|
14
|
+
f: (a: A) => HKT.Kind<F, FC, K, Q, W, X, I, _S, R, E, B>,
|
15
|
+
) => HKT.Kind<F, FC, K, Q, W, X, I, _S, R, E, T>;
|
15
16
|
}
|
16
17
|
|
17
18
|
export interface PTraversalMin<S, T, A, B> {
|
18
|
-
modifyA<F extends HKT,
|
19
|
+
modifyA: <F extends HKT, FC = HKT.None>(
|
20
|
+
F: Applicative<F, FC>,
|
21
|
+
) => <K, Q, W, X, I, _S, R, E>(
|
19
22
|
s: S,
|
20
|
-
f: (a: A) => HKT.Kind<F, K, Q, W, X, I, _S, R, E, B>,
|
21
|
-
|
22
|
-
): HKT.Kind<F, K, Q, W, X, I, _S, R, E, T>;
|
23
|
+
f: (a: A) => HKT.Kind<F, FC, K, Q, W, X, I, _S, R, E, B>,
|
24
|
+
) => HKT.Kind<F, FC, K, Q, W, X, I, _S, R, E, T>;
|
23
25
|
}
|
24
26
|
|
25
27
|
/**
|
@@ -37,18 +39,17 @@ export function mkPTraversal<S, T, A, B>(F: PTraversalMin<S, T, A, B>): PTravers
|
|
37
39
|
modifyA: F.modifyA,
|
38
40
|
...PSetter<S, T, A, B>({
|
39
41
|
modify_: (s, f) =>
|
40
|
-
F.modifyA(
|
42
|
+
F.modifyA(Identity.Applicative)(
|
41
43
|
s,
|
42
44
|
f.compose((b) => Identity.get(b)),
|
43
|
-
Identity.Applicative,
|
44
45
|
).getIdentity,
|
45
|
-
set_: (s, b) => F.modifyA(s, () => Identity.get(b)
|
46
|
+
set_: (s, b) => F.modifyA(Identity.Applicative)(s, () => Identity.get(b)).getIdentity,
|
46
47
|
}),
|
47
48
|
...Fold<S, A>({
|
48
49
|
foldMap_:
|
49
50
|
<M>(M: Monoid<M>) =>
|
50
51
|
(s: S, f: (a: A) => M) =>
|
51
|
-
F.modifyA(s, (a) => Const(f(a))
|
52
|
+
F.modifyA(Const.getApplicative(M))(s, (a) => Const(f(a))).getConst,
|
52
53
|
}),
|
53
54
|
};
|
54
55
|
}
|
package/_src/optics.ts
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
// codegen:start { preset: type-barrel, include: ./optics/*.ts }
|
2
|
+
export type {} from "./optics/At.js";
|
3
|
+
export type {} from "./optics/Fold.js";
|
4
|
+
export type {} from "./optics/Getter.js";
|
5
|
+
export type {} from "./optics/Index.js";
|
6
|
+
export type {} from "./optics/Iso.js";
|
7
|
+
export type {} from "./optics/Lens.js";
|
8
|
+
export type {} from "./optics/Optional.js";
|
9
|
+
export type {} from "./optics/Prism.js";
|
10
|
+
export type {} from "./optics/Setter.js";
|
11
|
+
export type {} from "./optics/Traversal.js";
|
12
|
+
// codegen:end
|
package/_src/typeclass/Align.ts
CHANGED
@@ -4,7 +4,7 @@ import type { Semialign } from "@fncts/base/typeclass/Semialign";
|
|
4
4
|
/**
|
5
5
|
* @tsplus type fncts.Align
|
6
6
|
*/
|
7
|
-
export interface Align<F extends HKT> extends Semialign<F>, Nil<F> {}
|
7
|
+
export interface Align<F extends HKT, FC = HKT.None> extends Semialign<F, FC>, Nil<F, FC> {}
|
8
8
|
|
9
9
|
/**
|
10
10
|
* @tsplus type fncts.AlignOps
|
package/_src/typeclass/Alt.ts
CHANGED
@@ -3,34 +3,36 @@ import type { Functor } from "@fncts/base/typeclass/Functor";
|
|
3
3
|
/**
|
4
4
|
* @tsplus type fncts.Alt
|
5
5
|
*/
|
6
|
-
export interface Alt<F extends HKT> extends Functor<F> {
|
7
|
-
alt<K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, B>(
|
8
|
-
fa: HKT.Kind<F, K, Q, W, X, I, S, R, E, A>,
|
6
|
+
export interface Alt<F extends HKT, FC = HKT.None> extends Functor<F, FC> {
|
7
|
+
alt: <K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, B>(
|
8
|
+
fa: HKT.Kind<F, FC, K, Q, W, X, I, S, R, E, A>,
|
9
9
|
that: Lazy<
|
10
10
|
HKT.Kind<
|
11
11
|
F,
|
12
|
-
|
13
|
-
HKT.Intro<"
|
14
|
-
HKT.Intro<"
|
15
|
-
HKT.Intro<"
|
16
|
-
HKT.Intro<"
|
17
|
-
HKT.Intro<"
|
18
|
-
HKT.Intro<"
|
19
|
-
HKT.Intro<"
|
20
|
-
HKT.Intro<"
|
12
|
+
FC,
|
13
|
+
HKT.Intro<F, "K", K, K1>,
|
14
|
+
HKT.Intro<F, "Q", Q, Q1>,
|
15
|
+
HKT.Intro<F, "W", W, W1>,
|
16
|
+
HKT.Intro<F, "X", X, X1>,
|
17
|
+
HKT.Intro<F, "I", I, I1>,
|
18
|
+
HKT.Intro<F, "S", S, S1>,
|
19
|
+
HKT.Intro<F, "R", R, R1>,
|
20
|
+
HKT.Intro<F, "E", E, E1>,
|
21
|
+
HKT.Intro<F, "A", A, B>
|
21
22
|
>
|
22
23
|
>,
|
23
|
-
)
|
24
|
+
) => HKT.Kind<
|
24
25
|
F,
|
25
|
-
|
26
|
-
HKT.Mix<"
|
27
|
-
HKT.Mix<"
|
28
|
-
HKT.Mix<"
|
29
|
-
HKT.Mix<"
|
30
|
-
HKT.Mix<"
|
31
|
-
HKT.Mix<"
|
32
|
-
HKT.Mix<"
|
33
|
-
HKT.Mix<"
|
26
|
+
FC,
|
27
|
+
HKT.Mix<F, "K", [K, K1]>,
|
28
|
+
HKT.Mix<F, "Q", [Q, Q1]>,
|
29
|
+
HKT.Mix<F, "W", [W, W1]>,
|
30
|
+
HKT.Mix<F, "X", [X, X1]>,
|
31
|
+
HKT.Mix<F, "I", [I, I1]>,
|
32
|
+
HKT.Mix<F, "S", [S, S1]>,
|
33
|
+
HKT.Mix<F, "R", [R, R1]>,
|
34
|
+
HKT.Mix<F, "E", [E, E1]>,
|
35
|
+
HKT.Mix<F, "A", [A, B]>
|
34
36
|
>;
|
35
37
|
}
|
36
38
|
|
@@ -40,35 +42,3 @@ export interface Alt<F extends HKT> extends Functor<F> {
|
|
40
42
|
export interface AltOps {}
|
41
43
|
|
42
44
|
export const Alt: AltOps = {};
|
43
|
-
|
44
|
-
export function alt<F extends HKT, K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, B>(
|
45
|
-
self: HKT.Kind<F, K, Q, W, X, I, S, R, E, A>,
|
46
|
-
that: Lazy<
|
47
|
-
HKT.Kind<
|
48
|
-
F,
|
49
|
-
HKT.Intro<"K", K, K1>,
|
50
|
-
HKT.Intro<"Q", Q, Q1>,
|
51
|
-
HKT.Intro<"W", W, W1>,
|
52
|
-
HKT.Intro<"X", X, X1>,
|
53
|
-
HKT.Intro<"I", I, I1>,
|
54
|
-
HKT.Intro<"S", S, S1>,
|
55
|
-
HKT.Intro<"R", R, R1>,
|
56
|
-
HKT.Intro<"E", E, E1>,
|
57
|
-
HKT.Intro<"A", A, B>
|
58
|
-
>
|
59
|
-
>,
|
60
|
-
/** @tsplus auto */ F: Alt<F>,
|
61
|
-
): HKT.Kind<
|
62
|
-
F,
|
63
|
-
HKT.Mix<"K", [K, K1]>,
|
64
|
-
HKT.Mix<"Q", [Q, Q1]>,
|
65
|
-
HKT.Mix<"W", [W, W1]>,
|
66
|
-
HKT.Mix<"X", [X, X1]>,
|
67
|
-
HKT.Mix<"I", [I, I1]>,
|
68
|
-
HKT.Mix<"S", [S, S1]>,
|
69
|
-
HKT.Mix<"R", [R, R1]>,
|
70
|
-
HKT.Mix<"E", [E, E1]>,
|
71
|
-
HKT.Mix<"A", [A, B]>
|
72
|
-
> {
|
73
|
-
return F.alt(self, that);
|
74
|
-
}
|
@@ -5,7 +5,7 @@ import type { Nil } from "@fncts/base/typeclass/Nil";
|
|
5
5
|
/**
|
6
6
|
* @tsplus type fncts.Alternative
|
7
7
|
*/
|
8
|
-
export interface Alternative<F extends HKT> extends Applicative<F>, Nil<F>, Alt<F> {}
|
8
|
+
export interface Alternative<F extends HKT, FC = HKT.None> extends Applicative<F, FC>, Nil<F, FC>, Alt<F, FC> {}
|
9
9
|
|
10
10
|
/**
|
11
11
|
* @tsplus type fncts.AlternativeOps
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { Apply } from "@fncts/base/typeclass/Apply";
|
2
2
|
import type { Pointed } from "@fncts/base/typeclass/Pointed";
|
3
3
|
|
4
|
-
export interface Applicative<F extends HKT> extends Apply<F>, Pointed<F> {}
|
4
|
+
export interface Applicative<F extends HKT, FC = HKT.None> extends Apply<F, FC>, Pointed<F, FC> {}
|
5
5
|
|
6
6
|
/**
|
7
7
|
* @tsplus type fncts.ApplicativeOps
|
@@ -9,3 +9,8 @@ export interface Applicative<F extends HKT> extends Apply<F>, Pointed<F> {}
|
|
9
9
|
export interface ApplicativeOps {}
|
10
10
|
|
11
11
|
export const Applicative: ApplicativeOps = {};
|
12
|
+
|
13
|
+
export type CompatibleApplicative<F extends HKT, FC, A> = Applicative<F, FC> &
|
14
|
+
([A] extends [HKT.Kind<F, any, any, any, any, any, any, any, any, any, any>]
|
15
|
+
? unknown
|
16
|
+
: ["invalid Applicative instance for", A]);
|