@fncts/base 0.0.12 → 0.0.13
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 +16 -21
- package/_cjs/collection/Iterable/api/traverseConc.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/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/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 +136 -153
- package/_cjs/collection/immutable/ImmutableArray/api.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs +10 -12
- package/_cjs/collection/immutable/ImmutableArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableArray/instances.cjs +11 -9
- package/_cjs/collection/immutable/ImmutableArray/instances.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/definition.cjs +3 -9
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/definition.cjs.map +1 -1
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs +8 -2
- package/_cjs/collection/immutable/ImmutableNonEmptyArray/instances.cjs.map +1 -1
- 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/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/control/Eval/api.cjs +9 -3
- package/_cjs/control/Eval/api.cjs.map +1 -1
- package/_cjs/control/Eval/definition.cjs +0 -7
- 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 +9 -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 +15 -13
- package/_cjs/control/Z/runtime.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 +7 -5
- 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 +3 -3
- package/_cjs/data/DecodeError/definition.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.cjs +21 -5
- package/_cjs/data/Either/api.cjs.map +1 -1
- package/_cjs/data/Either/definition.cjs +3 -10
- 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/Struct/definition.cjs +2 -4
- package/_cjs/data/Struct/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/optics/Optional/definition.cjs +4 -6
- package/_cjs/optics/Optional/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 +3 -3
- package/_cjs/optics/Traversal/definition.cjs.map +1 -1
- 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/MonadExcept.cjs +2 -10
- package/_cjs/typeclass/MonadExcept.cjs.map +1 -1
- package/_cjs/typeclass/Nil.cjs +0 -10
- package/_cjs/typeclass/Nil.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/_mjs/collection/Iterable/api/traverseConc.mjs +16 -21
- package/_mjs/collection/Iterable/api/traverseConc.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/immutable/Conc/api.mjs +7 -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/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/ImmutableArray/api.mjs +128 -147
- package/_mjs/collection/immutable/ImmutableArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs +10 -11
- package/_mjs/collection/immutable/ImmutableArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs +9 -8
- package/_mjs/collection/immutable/ImmutableArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs +18 -19
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/api.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs +0 -2
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/definition.mjs.map +1 -1
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs +4 -3
- package/_mjs/collection/immutable/ImmutableNonEmptyArray/instances.mjs.map +1 -1
- package/_mjs/collection/immutable/RoseTree/definition.mjs +13 -14
- package/_mjs/collection/immutable/RoseTree/definition.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/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/control/Eval/api.mjs +9 -4
- package/_mjs/control/Eval/api.mjs.map +1 -1
- package/_mjs/control/Eval/definition.mjs +0 -1
- 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/Z/api.mjs +16 -15
- package/_mjs/control/Z/api.mjs.map +1 -1
- package/_mjs/control/Z/definition.mjs +4 -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 +14 -13
- package/_mjs/control/Z/runtime.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 +6 -5
- package/_mjs/data/Const/instances.mjs.map +1 -1
- package/_mjs/data/Datum/api.mjs +403 -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 +3 -3
- package/_mjs/data/DecodeError/definition.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.mjs +16 -3
- package/_mjs/data/Either/api.mjs.map +1 -1
- package/_mjs/data/Either/definition.mjs +0 -2
- package/_mjs/data/Either/definition.mjs.map +1 -1
- package/_mjs/data/Either/instances.mjs +23 -22
- 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/Struct/definition.mjs +2 -3
- package/_mjs/data/Struct/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/optics/Optional/definition.mjs +4 -5
- 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 +1 -1
- package/_mjs/optics/Traversal/api/fromTraversable.mjs.map +1 -1
- package/_mjs/optics/Traversal/definition.mjs +3 -3
- package/_mjs/optics/Traversal/definition.mjs.map +1 -1
- 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/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/definition.mjs +0 -2
- package/_mjs/typeclass/Guard/definition.mjs.map +1 -1
- package/_mjs/typeclass/MonadExcept.mjs +2 -9
- package/_mjs/typeclass/MonadExcept.mjs.map +1 -1
- package/_mjs/typeclass/Nil.mjs +1 -8
- package/_mjs/typeclass/Nil.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/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/_src/collection/Iterable/api/traverseConc.ts +24 -21
- package/_src/collection/compat/Record/instances.ts +44 -0
- package/_src/collection/immutable/Conc/api.ts +9 -11
- package/_src/collection/immutable/Conc/definition.ts +9 -5
- 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 +56 -113
- package/_src/collection/immutable/ImmutableArray/definition.ts +8 -5
- package/_src/collection/immutable/ImmutableArray/instances.ts +42 -42
- package/_src/collection/immutable/ImmutableNonEmptyArray/api.ts +13 -11
- package/_src/collection/immutable/ImmutableNonEmptyArray/definition.ts +8 -3
- package/_src/collection/immutable/ImmutableNonEmptyArray/instances.ts +24 -25
- 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 +9 -9
- package/_src/collection/weak/IterableWeakMap.ts +50 -5
- package/_src/collection/weak/IterableWeakSet.ts +57 -9
- package/_src/control/Eval/api.ts +5 -2
- package/_src/control/Eval/definition.ts +7 -4
- package/_src/control/Eval/instance.ts +7 -7
- package/_src/control/Z/api.ts +16 -25
- package/_src/control/Z/definition.ts +32 -31
- package/_src/control/Z/instances.ts +3 -3
- package/_src/control/Z/runtime.ts +7 -7
- 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 +3 -3
- package/_src/data/Decoder/definition.ts +7 -4
- package/_src/data/Either/api.ts +12 -2
- package/_src/data/Either/definition.ts +9 -14
- 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 +7 -4
- 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/Zipped.ts +52 -0
- package/_src/data/function/api.ts +8 -0
- package/_src/data/object/instances.ts +11 -1
- 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/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 +8 -10
- 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/collection/Iterable/api/traverseConc.d.ts +4 -6
- package/collection/compat/Record/instances.d.ts +12 -0
- package/collection/immutable/Conc/api.d.ts +4 -6
- package/collection/immutable/Conc/definition.d.ts +9 -6
- 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 +16 -18
- package/collection/immutable/ImmutableArray/definition.d.ts +8 -6
- package/collection/immutable/ImmutableArray/instances.d.ts +17 -17
- package/collection/immutable/ImmutableNonEmptyArray/api.d.ts +6 -5
- package/collection/immutable/ImmutableNonEmptyArray/definition.d.ts +7 -3
- package/collection/immutable/ImmutableNonEmptyArray/instances.d.ts +10 -10
- 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 +8 -9
- package/collection/weak/IterableWeakMap.d.ts +9 -3
- package/collection/weak/IterableWeakSet.d.ts +10 -4
- 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 +8 -6
- package/control/Z/definition.d.ts +38 -32
- package/control/Z/instances.d.ts +2 -2
- package/control/Z/runtime.d.ts +5 -4
- 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/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 +7 -4
- 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/optics/Traversal/api/fromTraversable.d.ts +1 -1
- package/optics/Traversal/definition.d.ts +2 -4
- package/package.json +2 -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/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
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { HKT } from "@fncts/typelevel/HKT";
|
|
1
2
|
import { Predicate } from "@fncts/base/data/Predicate/definition";
|
|
2
3
|
import { Guard } from "@fncts/base/typeclass/Guard";
|
|
3
4
|
import { Decoder } from "@fncts/base/data/Decoder";
|
|
4
|
-
import type {
|
|
5
|
+
import type { EitherF } from "@fncts/base/data/Either/definition.js";
|
|
5
6
|
import { Either } from "@fncts/base/data/Either/definition";
|
|
6
7
|
import * as P from "../../typeclass.js";
|
|
7
8
|
/**
|
|
8
9
|
* @tsplus implicit
|
|
9
10
|
* @tsplus location "@fncts/base/data/Either/instances"
|
|
10
11
|
*/
|
|
11
|
-
export declare const Functor: P.Functor<EitherF>;
|
|
12
|
+
export declare const Functor: P.Functor<EitherF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
|
12
13
|
/**
|
|
13
14
|
* @tsplus static fncts.EitherOps getEq
|
|
14
15
|
* @tsplus location "@fncts/base/data/Either/instances"
|
|
@@ -23,7 +24,7 @@ export declare function deriveEq<A extends Either<any, any>>(...[left, right]: [
|
|
|
23
24
|
* @tsplus static fncts.EitherOps getFilterable
|
|
24
25
|
* @tsplus location "@fncts/base/data/Either/instances"
|
|
25
26
|
*/
|
|
26
|
-
export declare function getFilerable<E>(/** @tsplus auto */ ME: P.Monoid<E>): P.Filterable<
|
|
27
|
+
export declare function getFilerable<E>(/** @tsplus auto */ ME: P.Monoid<E>): P.Filterable<EitherF, HKT.Fix<"E", E>>;
|
|
27
28
|
/**
|
|
28
29
|
* @tsplus derive fncts.Guard[fncts.Either]<_> 10
|
|
29
30
|
* @tsplus location "@fncts/base/data/Either/instances"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { HKT } from "@fncts/typelevel/HKT";
|
|
2
|
+
import { Either } from "@fncts/base/data/Either/definition";
|
|
3
|
+
import { Lazy } from "@fncts/base/data/function/definition";
|
|
4
|
+
import type { EitherT } from "./definition.js";
|
|
5
|
+
import type * as P from "@fncts/base/typeclass";
|
|
6
|
+
/**
|
|
7
|
+
* @tsplus static fncts.EitherTOps __call
|
|
8
|
+
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
9
|
+
*/
|
|
10
|
+
export declare function make<F extends HKT, FC, K, Q, W, X, I, S, R, FE, E, A>(self: HKT.Kind<F, FC, K, Q, W, X, I, S, R, FE, Either<E, A>>): EitherT<F, FC, K, Q, W, X, I, S, R, FE, E, A>;
|
|
11
|
+
/**
|
|
12
|
+
* @tsplus static fncts.EitherTOps right
|
|
13
|
+
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
14
|
+
*/
|
|
15
|
+
export declare function right<F extends HKT, FC>(F: P.Pointed<F, FC>): <K, Q, W, X, I, S, R, FE, E = never, A = never>(a: A) => EitherT<F, FC, K, Q, W, X, I, S, R, FE, E, A>;
|
|
16
|
+
/**
|
|
17
|
+
* @tsplus static fncts.EitherTOps left
|
|
18
|
+
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
19
|
+
*/
|
|
20
|
+
export declare function left<F extends HKT, FC>(F: P.Pointed<F, FC>): <K, Q, W, X, I, S, R, FE, E, A = never>(e: E) => EitherT<F, FC, K, Q, W, X, I, S, R, FE, E, A>;
|
|
21
|
+
/**
|
|
22
|
+
* @tsplus static fncts.EitherTOps rightF
|
|
23
|
+
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
24
|
+
*/
|
|
25
|
+
export declare function rightF<F extends HKT, FC>(F: P.Functor<F, FC>): <K, Q, W, X, I, S, R, FE, E = never, A = never>(self: HKT.Kind<F, FC, K, Q, W, X, I, S, R, FE, A>) => EitherT<F, FC, K, Q, W, X, I, S, R, FE, E, A>;
|
|
26
|
+
/**
|
|
27
|
+
* @tsplus static fncts.EitherTOps leftF
|
|
28
|
+
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
29
|
+
*/
|
|
30
|
+
export declare function leftF<F extends HKT, FC>(F: P.Functor<F, FC>): <K, Q, W, X, I, S, R, FE, E = never, A = never>(self: HKT.Kind<F, FC, K, Q, W, X, I, S, R, FE, E>) => EitherT<F, FC, K, Q, W, X, I, S, R, FE, E, A>;
|
|
31
|
+
/**
|
|
32
|
+
* @tsplus static fncts.EitherTOps map
|
|
33
|
+
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
34
|
+
*/
|
|
35
|
+
export declare function map<F extends HKT, FC>(F: P.Functor<F, FC>): <K, Q, W, X, I, S, R, FE, E, A, B>(self: EitherT<F, FC, K, Q, W, X, I, S, R, FE, E, A>, f: (a: A) => B) => EitherT<F, FC, K, Q, W, X, I, S, R, FE, E, B>;
|
|
36
|
+
/**
|
|
37
|
+
* @tsplus static fncts.EitherTOps mapLeft
|
|
38
|
+
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
39
|
+
*/
|
|
40
|
+
export declare function mapLeft<F extends HKT, FC = HKT.None>(F: P.Functor<F, FC>): <K, Q, W, X, I, S, R, FE, E, A, E1>(self: HKT.Kind<F, FC, K, Q, W, X, I, S, R, FE, Either<E, A>>, f: (e: E) => E1) => HKT.Kind<F, FC, K, Q, W, X, I, S, R, FE, Either<E1, A>>;
|
|
41
|
+
/**
|
|
42
|
+
* @tsplus static fncts.EitherTOps bimap
|
|
43
|
+
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
44
|
+
*/
|
|
45
|
+
export declare function bimap<F extends HKT, FC = HKT.None>(F: P.Functor<F, FC>): <K, Q, W, X, I, S, R, FE, E, A, E1, B>(self: HKT.Kind<F, FC, K, Q, W, X, I, S, R, FE, Either<E, A>>, f: (e: E) => E1, g: (a: A) => B) => HKT.Kind<F, FC, K, Q, W, X, I, S, R, FE, Either<E1, B>>;
|
|
46
|
+
/**
|
|
47
|
+
* @tsplus static fncts.EitherTOps flatMap
|
|
48
|
+
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
49
|
+
*/
|
|
50
|
+
export declare function flatMap<F extends HKT, FC>(F: P.Monad<F, FC>): <K, Q, W, X, I, S, R, FE, E, A, K1, Q1, W1, X1, I1, S1, R1, FE1, E1, B>(self: import("@fncts/typelevel/HKT.js").HKT.Kind<F, FC, K, Q, W, X, I, S, R, FE, import("../Either.js").Either<E, A>>, f: (a: A) => import("@fncts/typelevel/HKT.js").HKT.Kind<F, FC, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "K", K, K1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "Q", Q, Q1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "W", W, W1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "X", X, X1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "I", I, I1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "S", S, S1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "R", R, R1>, import("@fncts/typelevel/HKT.js").HKT.Intro<F, "E", FE, FE1>, import("../Either.js").Either<E1, B>>) => import("@fncts/typelevel/HKT.js").HKT.Kind<F, FC, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "K", [K, K1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "Q", [Q, Q1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "W", [W, W1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "X", [X, X1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "I", [I, I1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "S", [S, S1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "R", [R, R1]>, import("@fncts/typelevel/HKT.js").HKT.Mix<F, "E", [FE, FE1]>, import("../Either.js").Either<E | E1, B>>;
|
|
51
|
+
/**
|
|
52
|
+
* @tsplus static fncts.EitherTOps zipWith
|
|
53
|
+
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
54
|
+
*/
|
|
55
|
+
export declare function zipWith<F extends HKT, FC = HKT.None>(F: P.Apply<F, FC>): <K, Q, W, X, I, S, R, EF, E, A, K1, Q1, W1, X1, I1, S1, R1, EF1, E1, B, C>(self: HKT.Kind<F, FC, K, Q, W, X, I, S, R, EF, Either<E, A>>, that: HKT.Kind<F, FC, 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", EF, EF1>, Either<E1, B>>, f: (a: A, b: B) => C) => HKT.Kind<F, FC, 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", EF, EF1>, Either<E | E1, C>>;
|
|
56
|
+
/**
|
|
57
|
+
* @tsplus static fncts.EitherTOps orElse
|
|
58
|
+
* @tsplus location "@fncts/base/data/EitherT/api"
|
|
59
|
+
*/
|
|
60
|
+
export declare function orElse<F extends HKT, FC = HKT.None>(F: P.Monad<F, FC>): <K, Q, W, X, I, S, R, EF, E, A, K1, Q1, W1, X1, I1, S1, R1, EF1, E1, B>(fa: HKT.Kind<F, FC, K, Q, W, X, I, S, R, EF, Either<E, A>>, that: Lazy<HKT.Kind<F, FC, 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", EF, EF1>, Either<E1, B>>>) => HKT.Kind<F, FC, 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", [EF, EF1]>, Either<E | E1, A | B>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HKT } from "@fncts/typelevel/HKT";
|
|
2
|
+
import { Either } from "@fncts/base/data/Either/definition";
|
|
3
|
+
/**
|
|
4
|
+
* @tsplus type fncts.EitherT
|
|
5
|
+
*/
|
|
6
|
+
export declare type EitherT<F extends HKT, FC, K, Q, W, X, I, S, R, EF, E, A> = HKT.Kind<F, FC, K, Q, W, X, I, S, R, EF, Either<E, A>>;
|
|
7
|
+
/**
|
|
8
|
+
* @tsplus type fncts.EitherTOps
|
|
9
|
+
*/
|
|
10
|
+
export interface EitherTOps {
|
|
11
|
+
}
|
|
12
|
+
export declare const EitherT: EitherTOps;
|
|
@@ -6,17 +6,18 @@ import { Maybe } from "@fncts/base/data/Maybe/definition";
|
|
|
6
6
|
* @tsplus fluent fncts.Environment add
|
|
7
7
|
* @tsplus location "@fncts/base/data/Environment/api"
|
|
8
8
|
*/
|
|
9
|
-
export declare function add<R,
|
|
9
|
+
export declare function add<R, H extends S, S = H>(self: Environment<R>, service: H, tag: Tag<S>): Environment<R | S>;
|
|
10
10
|
/**
|
|
11
11
|
* @tsplus static fncts.EnvironmentOps empty
|
|
12
12
|
* @tsplus location "@fncts/base/data/Environment/api"
|
|
13
13
|
*/
|
|
14
|
-
export declare const empty: import("./definition").Environment<
|
|
14
|
+
export declare const empty: import("./definition").Environment<never>;
|
|
15
|
+
declare type Tags<R> = R extends infer S ? Tag<S> : never;
|
|
15
16
|
/**
|
|
16
17
|
* @tsplus fluent fncts.Environment get
|
|
17
18
|
* @tsplus location "@fncts/base/data/Environment/api"
|
|
18
19
|
*/
|
|
19
|
-
export declare function get<R extends
|
|
20
|
+
export declare function get<R, T extends Tags<R>>(self: Environment<R>, tag: T): T extends Tag<infer S> ? S : never;
|
|
20
21
|
/**
|
|
21
22
|
* @tsplus fluent fncts.Environment getMaybe
|
|
22
23
|
* @tsplus location "@fncts/base/data/Environment/api"
|
|
@@ -26,7 +27,7 @@ export declare function getMaybe<R extends Has<S>, S>(self: Environment<R>, tag:
|
|
|
26
27
|
* @tsplus static fncts.EnvironmentOps __call
|
|
27
28
|
* @tsplus location "@fncts/base/data/Environment/api"
|
|
28
29
|
*/
|
|
29
|
-
export declare function make(): Environment<
|
|
30
|
+
export declare function make(): Environment<never>;
|
|
30
31
|
/**
|
|
31
32
|
* @tsplus operator fncts.Environment +
|
|
32
33
|
* @tsplus fluent fncts.Environment union
|
|
@@ -47,4 +48,5 @@ export declare function unsafeGet<R, S>(self: Environment<R>, tag: Tag<S>): S;
|
|
|
47
48
|
* @tsplus fluent fncts.Environment update
|
|
48
49
|
* @tsplus location "@fncts/base/data/Environment/api"
|
|
49
50
|
*/
|
|
50
|
-
export declare function update<R extends
|
|
51
|
+
export declare function update<R, S extends R>(self: Environment<R>, f: (s: S) => S, tag: Tag<S>): Environment<R>;
|
|
52
|
+
export {};
|
|
@@ -13,12 +13,12 @@ export declare type EnvSymbol = typeof EnvSymbol;
|
|
|
13
13
|
* @tsplus companion fncts.EnvironmentOps
|
|
14
14
|
*/
|
|
15
15
|
export declare class Environment<R> implements Hashable, Equatable {
|
|
16
|
-
readonly map: HashMap<Tag<
|
|
16
|
+
readonly map: HashMap<Tag<any>, readonly [unknown, number]>;
|
|
17
17
|
readonly index: number;
|
|
18
|
-
cache: HashMap<Tag<
|
|
18
|
+
cache: HashMap<Tag<any>, unknown>;
|
|
19
19
|
readonly _typeId: EnvSymbol;
|
|
20
20
|
readonly [EnvSymbol]: (_: never) => R;
|
|
21
|
-
constructor(map: HashMap<Tag<
|
|
21
|
+
constructor(map: HashMap<Tag<any>, readonly [unknown, number]>, index: number, cache?: HashMap<Tag<any>, unknown>);
|
|
22
22
|
get [Symbol.hash](): number;
|
|
23
23
|
[Symbol.equals](that: unknown): boolean;
|
|
24
24
|
}
|
package/data/Identity/api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Identity } from "@fncts/base/data/Identity/definition";
|
|
2
|
+
import { Zipped } from "@fncts/base/data/Zipped";
|
|
2
3
|
/**
|
|
3
4
|
* @tsplus fluent fncts.Identity ap
|
|
4
5
|
* @tsplus location "@fncts/base/data/Identity/api"
|
|
@@ -24,7 +25,7 @@ export declare function zipWith_<A, B, C>(fa: Identity<A>, fb: Identity<B>, f: (
|
|
|
24
25
|
* @tsplus fluent fncts.Identity zip
|
|
25
26
|
* @tsplus location "@fncts/base/data/Identity/api"
|
|
26
27
|
*/
|
|
27
|
-
export declare function zip_<A, B>(fa: Identity<A>, fb: Identity<B>): Identity<
|
|
28
|
+
export declare function zip_<A, B>(fa: Identity<A>, fb: Identity<B>): Identity<Zipped.Make<A, B>>;
|
|
28
29
|
/**
|
|
29
30
|
* @tsplus getter fncts.Identity getIdentity
|
|
30
31
|
* @tsplus macro identity
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HKT } from "@fncts/typelevel/HKT";
|
|
2
2
|
import { Newtype, NewtypeIso } from "@fncts/base/data/Newtype";
|
|
3
|
-
export interface IdentityN {
|
|
4
|
-
|
|
3
|
+
export interface IdentityN extends HKT {
|
|
4
|
+
type: Identity<this["A"]>;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* @tsplus type fncts.Identity
|
|
@@ -4,14 +4,14 @@ import type { IdentityN } from "@fncts/base/data/Identity/definition";
|
|
|
4
4
|
* @tsplus static fncts.IdentityOps Functor
|
|
5
5
|
* @tsplus location "@fncts/base/data/Identity/instances"
|
|
6
6
|
*/
|
|
7
|
-
export declare const Functor: P.Functor<IdentityN>;
|
|
7
|
+
export declare const Functor: P.Functor<IdentityN, import("@fncts/typelevel/HKT.js").HKT.None>;
|
|
8
8
|
/**
|
|
9
9
|
* @tsplus static fncts.IdentityOps Apply
|
|
10
10
|
* @tsplus location "@fncts/base/data/Identity/instances"
|
|
11
11
|
*/
|
|
12
|
-
export declare const Apply: P.Apply<IdentityN>;
|
|
12
|
+
export declare const Apply: P.Apply<IdentityN, import("@fncts/typelevel/HKT.js").HKT.None>;
|
|
13
13
|
/**
|
|
14
14
|
* @tsplus static fncts.IdentityOps Applicative
|
|
15
15
|
* @tsplus location "@fncts/base/data/Identity/instances"
|
|
16
16
|
*/
|
|
17
|
-
export declare const Applicative: P.Applicative<IdentityN>;
|
|
17
|
+
export declare const Applicative: P.Applicative<IdentityN, import("@fncts/typelevel/HKT.js").HKT.None>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { List } from "@fncts/base/collection/immutable/List/definition";
|
|
2
|
+
import { Interval } from "@fncts/base/data/Interval";
|
|
3
|
+
/**
|
|
4
|
+
* @tsplus type fncts.Intervals
|
|
5
|
+
* @tsplus companion fncts.IntervalsOps
|
|
6
|
+
*/
|
|
7
|
+
export declare class Intervals {
|
|
8
|
+
readonly intervals: List<Interval>;
|
|
9
|
+
constructor(intervals: List<Interval>);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @tsplus static fncts.IntervalsOps __call
|
|
13
|
+
* @tsplus location "@fncts/base/data/Intervals"
|
|
14
|
+
*/
|
|
15
|
+
export declare function make(intervals: List<Interval>): Intervals;
|
|
16
|
+
/**
|
|
17
|
+
* @tsplus fluent fncts.Intervals union
|
|
18
|
+
* @tsplus operator fncts.Intervals ||
|
|
19
|
+
* @tsplus location "@fncts/base/data/Intervals"
|
|
20
|
+
*/
|
|
21
|
+
export declare function union(self: Intervals, that: Intervals): Intervals;
|
|
22
|
+
/**
|
|
23
|
+
* @tsplus fluent fncts.Intervals intersect
|
|
24
|
+
* @tsplus operator fncts.Intervals &&
|
|
25
|
+
* @tsplus location "@fncts/base/data/Intervals"
|
|
26
|
+
*/
|
|
27
|
+
export declare function intersect(self: Intervals, that: Intervals): Intervals;
|
|
28
|
+
/**
|
|
29
|
+
* @tsplus getter fncts.Intervals start
|
|
30
|
+
* @tsplus location "@fncts/base/data/Intervals"
|
|
31
|
+
*/
|
|
32
|
+
export declare function start(self: Intervals): number;
|
|
33
|
+
/**
|
|
34
|
+
* @tsplus getter fncts.Intervals end
|
|
35
|
+
* @tsplus location "@fncts/base/data/Intervals"
|
|
36
|
+
*/
|
|
37
|
+
export declare function end(self: Intervals): number;
|
|
38
|
+
/**
|
|
39
|
+
* @tsplus fluent fncts.Intervals lt
|
|
40
|
+
* @tsplus operator fncts.Intervals <
|
|
41
|
+
* @tsplus location "@fncts/base/data/Intervals"
|
|
42
|
+
*/
|
|
43
|
+
export declare function lt(self: Intervals, that: Intervals): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* @tsplus fluent fncts.Intervals max
|
|
46
|
+
* @tsplus location "@fncts/base/data/Intervals"
|
|
47
|
+
*/
|
|
48
|
+
export declare function max(self: Intervals, that: Intervals): Intervals;
|
|
49
|
+
/**
|
|
50
|
+
* @tsplus getter fncts.Intervals isNonEmpty
|
|
51
|
+
* @tsplus location "@fncts/base/data/Intervals"
|
|
52
|
+
*/
|
|
53
|
+
export declare function isNonEmpty(self: Intervals): boolean;
|
package/data/Maybe/api.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Predicate } from "@fncts/base/data/Predicate/definition";
|
|
|
3
3
|
import { Refinement } from "@fncts/base/data/Refinement/definition";
|
|
4
4
|
import { Either } from "@fncts/base/data/Either/definition";
|
|
5
5
|
import { Lazy } from "@fncts/base/data/function/definition";
|
|
6
|
+
import { Zipped } from "@fncts/base/data/Zipped";
|
|
6
7
|
import type { Eq, Monoid } from "@fncts/base/typeclass";
|
|
7
8
|
import type { Nullable } from "@fncts/base/types";
|
|
8
9
|
/**
|
|
@@ -108,4 +109,4 @@ export declare function zipWith_<A, B, C>(self: Maybe<A>, fb: Maybe<B>, f: (a: A
|
|
|
108
109
|
* @tsplus fluent fncts.Maybe zip
|
|
109
110
|
* @tsplus location "@fncts/base/data/Maybe/api"
|
|
110
111
|
*/
|
|
111
|
-
export declare function zip_<A, B>(self: Maybe<A>, that: Maybe<B>): Maybe<
|
|
112
|
+
export declare function zip_<A, B>(self: Maybe<A>, that: Maybe<B>): Maybe<Zipped.Make<A, B>>;
|
|
@@ -7,16 +7,19 @@ export declare const enum MaybeTag {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const MaybeTypeId: unique symbol;
|
|
9
9
|
export declare type MaybeTypdId = typeof MaybeTypeId;
|
|
10
|
-
export
|
|
10
|
+
export interface MaybeF extends HKT {
|
|
11
|
+
type: Maybe<this["A"]>;
|
|
12
|
+
variance: {
|
|
13
|
+
A: "+";
|
|
14
|
+
};
|
|
15
|
+
}
|
|
11
16
|
/**
|
|
12
17
|
* @tsplus type fncts.Maybe
|
|
13
18
|
* @tsplus companion fncts.MaybeOps
|
|
14
19
|
*/
|
|
15
20
|
export declare class Maybe<A> {
|
|
21
|
+
readonly _A: () => A;
|
|
16
22
|
readonly _typeId: MaybeTypdId;
|
|
17
|
-
readonly [HKT.F]: MaybeF;
|
|
18
|
-
readonly [HKT.A]: () => A;
|
|
19
|
-
readonly [HKT.T]: Maybe<HKT._A<this>>;
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
22
25
|
* @tsplus type fncts.Just
|
|
@@ -3,12 +3,12 @@ import { Guard } from "@fncts/base/typeclass/Guard";
|
|
|
3
3
|
import { Decoder } from "@fncts/base/data/Decoder";
|
|
4
4
|
import type * as P from "../../typeclass.js";
|
|
5
5
|
import type { MaybeF } from "@fncts/base/data/Maybe/definition";
|
|
6
|
-
export declare const Functor: P.Functor<MaybeF>;
|
|
7
|
-
export declare const Apply: P.Apply<MaybeF>;
|
|
8
|
-
export declare const Applicative: P.Applicative<MaybeF>;
|
|
9
|
-
export declare const Monad: P.Monad<MaybeF>;
|
|
10
|
-
export declare const Foldable: P.Foldable<MaybeF>;
|
|
11
|
-
export declare const Filterable: P.Filterable<MaybeF>;
|
|
6
|
+
export declare const Functor: P.Functor<MaybeF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
|
7
|
+
export declare const Apply: P.Apply<MaybeF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
|
8
|
+
export declare const Applicative: P.Applicative<MaybeF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
|
9
|
+
export declare const Monad: P.Monad<MaybeF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
|
10
|
+
export declare const Foldable: P.Foldable<MaybeF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
|
11
|
+
export declare const Filterable: P.Filterable<MaybeF, import("@fncts/typelevel/HKT.js").HKT.None>;
|
|
12
12
|
/**
|
|
13
13
|
* @tsplus derive fncts.Guard[fncts.Maybe]<_> 10
|
|
14
14
|
* @tsplus location "@fncts/base/data/Maybe/instances"
|
package/data/Newtype.d.ts
CHANGED
|
@@ -2,12 +2,13 @@ import { HKT } from "@fncts/typelevel/HKT";
|
|
|
2
2
|
/**
|
|
3
3
|
* @tsplus type fncts.Newtype
|
|
4
4
|
*/
|
|
5
|
-
export interface Newtype<URI, A> {
|
|
5
|
+
export interface Newtype<URI, A, C = HKT.None> {
|
|
6
6
|
readonly _URI: URI;
|
|
7
|
-
readonly
|
|
7
|
+
readonly _A: A;
|
|
8
|
+
readonly _C: C;
|
|
8
9
|
}
|
|
9
10
|
export declare namespace Newtype {
|
|
10
|
-
type Iso<N extends NewtypeHKT> = NewtypeIso<N>;
|
|
11
|
+
type Iso<N extends NewtypeHKT, C = N["type"]["_C"]> = NewtypeIso<N, C>;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* @tsplus type fncts.NewtypeOps
|
|
@@ -16,20 +17,20 @@ export interface NewtypeOps {
|
|
|
16
17
|
}
|
|
17
18
|
export declare const Newtype: NewtypeOps;
|
|
18
19
|
export interface NewtypeHKT extends HKT {
|
|
19
|
-
readonly
|
|
20
|
+
readonly type: Newtype<any, any>;
|
|
20
21
|
}
|
|
21
|
-
export interface NewtypeIso<N extends NewtypeHKT> {
|
|
22
|
+
export interface NewtypeIso<N extends NewtypeHKT, C = N["type"]["_C"]> {
|
|
22
23
|
/**
|
|
23
24
|
* @tsplus macro identity
|
|
24
25
|
*/
|
|
25
|
-
get: <K, Q, W, X, I, S, R, E, A
|
|
26
|
+
get: <K extends HKT.GetExtends<C, "K", any>, Q extends HKT.GetExtends<C, "Q", any>, W extends HKT.GetExtends<C, "W", any>, X extends HKT.GetExtends<C, "X", any>, I extends HKT.GetExtends<C, "I", any>, S extends HKT.GetExtends<C, "S", any>, R extends HKT.GetExtends<C, "E", any>, E extends HKT.GetExtends<C, "E", any>, A extends HKT.GetExtends<C, "A", any>>(_: HKT.Kind<N, N["type"]["_C"], K, Q, W, X, I, S, R, E, A>["_A"]) => HKT.Kind<N, HKT.None, K, Q, W, X, I, S, R, E, A>;
|
|
26
27
|
/**
|
|
27
28
|
* @tsplus macro identity
|
|
28
29
|
*/
|
|
29
|
-
reverseGet: <K, Q, W, X, I, S, R, E, A
|
|
30
|
+
reverseGet: <K extends HKT.GetExtends<C, "K", any>, Q extends HKT.GetExtends<C, "Q", any>, W extends HKT.GetExtends<C, "W", any>, X extends HKT.GetExtends<C, "X", any>, I extends HKT.GetExtends<C, "I", any>, S extends HKT.GetExtends<C, "S", any>, R extends HKT.GetExtends<C, "E", any>, E extends HKT.GetExtends<C, "E", any>, A extends HKT.GetExtends<C, "A", any>>(_: HKT.Kind<N, HKT.None, K, Q, W, X, I, S, R, E, A>) => HKT.Kind<N, HKT.None, K, Q, W, X, I, S, R, E, A>["_A"];
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
32
33
|
* @tsplus static fncts.NewtypeOps __call
|
|
33
34
|
* @tsplus location "@fncts/base/data/Newtype"
|
|
34
35
|
*/
|
|
35
|
-
export declare const newtype: <N extends NewtypeHKT>() => NewtypeIso<N>;
|
|
36
|
+
export declare const newtype: <N extends NewtypeHKT>() => NewtypeIso<N, N["type"]["_C"]>;
|
package/data/Tag/definition.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export declare type TagTypeId = typeof TagTypeId;
|
|
|
8
8
|
* @tsplus type fncts.Tag
|
|
9
9
|
* @tsplus companion fncts.TagOps
|
|
10
10
|
*/
|
|
11
|
-
export declare class Tag<T> implements Hashable, Equatable {
|
|
12
|
-
|
|
11
|
+
export declare class Tag<in out T> implements Hashable, Equatable {
|
|
12
|
+
_T: (_: T) => T;
|
|
13
13
|
readonly _typeId: TagTypeId;
|
|
14
14
|
private static counter;
|
|
15
15
|
readonly id: number;
|
package/data/Zipped.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const ZippedTypeId: unique symbol;
|
|
2
|
+
export declare type ZippedTypeId = typeof ZippedTypeId;
|
|
3
|
+
export declare type Zipped<A extends Array<any>> = Readonly<A> & {
|
|
4
|
+
readonly [ZippedTypeId]: ZippedTypeId;
|
|
5
|
+
};
|
|
6
|
+
export declare namespace Zipped {
|
|
7
|
+
type Make<A, B> = [A] extends [Zipped<infer X>] ? [B] extends [Zipped<infer Y>] ? Zipped<[...X, ...Y]> : Zipped<[...X, B]> : [B] extends [Zipped<infer Y>] ? Zipped<[A, ...Y]> : Zipped<[A, B]>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @tsplus type fncts.ZippedOps
|
|
11
|
+
*/
|
|
12
|
+
export interface ZippedOps {
|
|
13
|
+
}
|
|
14
|
+
export declare const Zipped: ZippedOps;
|
|
15
|
+
/**
|
|
16
|
+
* @tsplus static fncts.ZippedOps is
|
|
17
|
+
* @tsplus location "@fncts/base/data/Zipped"
|
|
18
|
+
*/
|
|
19
|
+
export declare function isZipped(a: unknown): a is Zipped<Array<unknown>>;
|
|
20
|
+
/**
|
|
21
|
+
* @tsplus static fncts.ZippedOps __call
|
|
22
|
+
* @tsplus location "@fncts/base/data/Zipped"
|
|
23
|
+
*/
|
|
24
|
+
export declare function make<A, B>(a: A, b: B): Zipped.Make<A, B>;
|
package/data/function/api.d.ts
CHANGED
|
@@ -20,6 +20,12 @@ export declare function identity<A>(a: A): A;
|
|
|
20
20
|
*/
|
|
21
21
|
export declare function tuple<A extends ReadonlyArray<unknown>>(...as: A): A;
|
|
22
22
|
/**
|
|
23
|
+
* @tsplus getter fncts.Function tupled
|
|
24
|
+
* @tsplus location "@fncts/base/data/function/api"
|
|
25
|
+
*/
|
|
26
|
+
export declare function tupled<A, B, C>(f: (a: A, b: B) => C): (_: readonly [A, B]) => C;
|
|
27
|
+
/**
|
|
28
|
+
* @tsplus fluent global unsafeCoerce
|
|
23
29
|
* @tsplus static fncts.FunctionOps unsafeCoerce
|
|
24
30
|
* @tsplus macro identity
|
|
25
31
|
* @tsplus location "@fncts/base/data/function/api"
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import type { Check } from "@fncts/typelevel/Check";
|
|
1
2
|
import * as P from "@fncts/base/typeclass";
|
|
2
3
|
/**
|
|
3
|
-
* @tsplus implicit
|
|
4
4
|
* @tsplus static fncts.globalOps Guard
|
|
5
5
|
* @tsplus location "@fncts/base/data/object/instances"
|
|
6
6
|
*/
|
|
7
7
|
export declare const Guard: P.Guard<{}>;
|
|
8
|
+
/**
|
|
9
|
+
* @tsplus derive fncts.Guard<_> 10
|
|
10
|
+
* @tsplus location "@fncts/base/data/object/instances"
|
|
11
|
+
*/
|
|
12
|
+
export declare function deriveGuard<A extends {}>(..._: Check<Check.IsEqual<A, {}>> extends Check.True ? [] : never): P.Guard<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<
|
|
8
|
+
export declare function fromTraversable<F extends HKT, FC = HKT.None>(T: P.Traversable<F, FC>): <A, B, K = import("@fncts/typelevel/HKT").HKT.Low<F, "K">, Q = import("@fncts/typelevel/HKT").HKT.Low<F, "Q">, W = import("@fncts/typelevel/HKT").HKT.Low<F, "W">, X = import("@fncts/typelevel/HKT").HKT.Low<F, "X">, I = import("@fncts/typelevel/HKT").HKT.Low<F, "I">, S = import("@fncts/typelevel/HKT").HKT.Low<F, "S">, R = import("@fncts/typelevel/HKT").HKT.Low<F, "R">, E = import("@fncts/typelevel/HKT").HKT.Low<F, "E">>() => PTraversal<import("@fncts/typelevel/HKT").HKT.Kind<F, FC, K, Q, W, X, I, S, R, E, A>, import("@fncts/typelevel/HKT").HKT.Kind<F, FC, K, Q, W, X, I, S, R, E, B>, A, B>;
|
|
@@ -6,12 +6,10 @@ 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
|
-
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>;
|
|
9
|
+
modifyA: <F extends HKT, FC = HKT.None>(F: Applicative<F, FC>) => <K, Q, W, X, I, _S, R, E>(s: S, f: (a: A) => HKT.Kind<F, FC, K, Q, W, X, I, _S, R, E, B>) => HKT.Kind<F, FC, K, Q, W, X, I, _S, R, E, T>;
|
|
11
10
|
}
|
|
12
11
|
export interface PTraversalMin<S, T, A, B> {
|
|
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>;
|
|
12
|
+
modifyA: <F extends HKT, FC = HKT.None>(F: Applicative<F, FC>) => <K, Q, W, X, I, _S, R, E>(s: S, f: (a: A) => HKT.Kind<F, FC, K, Q, W, X, I, _S, R, E, B>) => HKT.Kind<F, FC, K, Q, W, X, I, _S, R, E, T>;
|
|
15
13
|
}
|
|
16
14
|
/**
|
|
17
15
|
* @tsplus type fncts.optics.PTraversalOps
|
package/package.json
CHANGED
package/typeclass/Align.d.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/typeclass/Alt.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ 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> 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>>>)
|
|
7
|
+
export interface Alt<F extends HKT, FC = HKT.None> extends Functor<F, FC> {
|
|
8
|
+
alt: <K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, B>(fa: HKT.Kind<F, FC, K, Q, W, X, I, S, R, E, A>, that: Lazy<HKT.Kind<F, FC, 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, FC, 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]>>;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* @tsplus type fncts.AltOps
|
|
@@ -13,5 +13,3 @@ export interface Alt<F extends HKT> extends Functor<F> {
|
|
|
13
13
|
export interface AltOps {
|
|
14
14
|
}
|
|
15
15
|
export declare const Alt: AltOps;
|
|
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]>>;
|
|
@@ -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 { HKT } from "@fncts/typelevel/HKT";
|
|
2
2
|
import type { Apply } from "@fncts/base/typeclass/Apply";
|
|
3
3
|
import type { Pointed } from "@fncts/base/typeclass/Pointed";
|
|
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,4 @@ export interface Applicative<F extends HKT> extends Apply<F>, Pointed<F> {
|
|
|
9
9
|
export interface ApplicativeOps {
|
|
10
10
|
}
|
|
11
11
|
export declare const Applicative: ApplicativeOps;
|
|
12
|
+
export declare type CompatibleApplicative<F extends HKT, FC, A> = Applicative<F, FC> & ([A] extends [HKT.Kind<F, any, any, any, any, any, any, any, any, any, any>] ? unknown : ["invalid Applicative instance for", A]);
|
|
@@ -6,8 +6,8 @@ import type { Fail } from "@fncts/base/typeclass/Fail";
|
|
|
6
6
|
/**
|
|
7
7
|
* @tsplus type fncts.ApplicativeExcept
|
|
8
8
|
*/
|
|
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>)
|
|
9
|
+
export interface ApplicativeExcept<F extends HKT, FC = HKT.None> extends Applicative<F, FC>, Fail<F, FC> {
|
|
10
|
+
catchAll: <K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, A1>(fa: HKT.Kind<F, FC, K, Q, W, X, I, S, R, E, A>, f: (e: E) => HKT.Kind<F, FC, 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, FC, 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>;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* @tsplus type fncts.ApplicativeExceptOps
|
|
@@ -15,21 +15,13 @@ export interface ApplicativeExcept<F extends HKT> extends Applicative<F>, Fail<F
|
|
|
15
15
|
export interface ApplicativeExceptOps {
|
|
16
16
|
}
|
|
17
17
|
export declare const ApplicativeExcept: ApplicativeExceptOps;
|
|
18
|
-
/**
|
|
19
|
-
* @tsplus fluent fncts.Kind catchAll
|
|
20
|
-
* @tsplus location "@fncts/base/typeclass/ApplicativeExcept"
|
|
21
|
-
*/
|
|
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>;
|
|
24
18
|
/**
|
|
25
19
|
* @tsplus fluent fncts.Kind catchJust
|
|
26
20
|
* @tsplus location "@fncts/base/typeclass/ApplicativeExcept"
|
|
27
21
|
*/
|
|
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>;
|
|
22
|
+
export declare function catchJust<F extends HKT, FC = HKT.None>(F: ApplicativeExcept<F, FC>): <K, Q, W, X, I, S, R, E, A, K1, Q1, W1, X1, I1, S1, R1, E1, A1>(fa: HKT.Kind<F, FC, K, Q, W, X, I, S, R, E, A>, f: (e: E) => Maybe<HKT.Kind<F, FC, 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, FC, 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>;
|
|
30
23
|
/**
|
|
31
|
-
* @tsplus
|
|
24
|
+
* @tsplus static fncts.ApplicativeExceptOps either
|
|
32
25
|
* @tsplus location "@fncts/base/typeclass/ApplicativeExcept"
|
|
33
26
|
*/
|
|
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>>;
|
|
27
|
+
export declare function either<F extends HKT, FC = HKT.None>(F: ApplicativeExcept<F, FC>): <K, Q, W, X, I, S, R, E, A>(self: HKT.Kind<F, FC, K, Q, W, X, I, S, R, E, A>) => HKT.Kind<F, FC, K, Q, W, X, I, S, R, never, Either<E, A>>;
|