import {
  alt,
  altValidation,
  ap as ap2,
  chainNullableK,
  flatMap,
  fromNullable,
  fromNullableK,
  getOrElse,
  left as left2,
  leftF,
  map as map2,
  mapBoth,
  mapError,
  match,
  matchE,
  orElse,
  orLeft,
  right as right3,
  rightF,
  swap,
  tapError,
  toUnion
} from "./chunk-HZOOJZWX.mjs";
import {
  filter,
  filterMap,
  partition,
  partitionMap
} from "./chunk-NNZUJMKX.mjs";
import {
  compact,
  separate
} from "./chunk-47WJXJHK.mjs";
import {
  fromTaskK,
  tapTask
} from "./chunk-WCFCQNDF.mjs";
import {
  ApplicativePar,
  ApplyPar,
  ApplySeq,
  Functor as Functor2,
  Monad,
  Pointed,
  flatMap as flatMap2,
  fromIO,
  map as map3,
  of,
  traverseReadonlyNonEmptyArrayWithIndex as traverseReadonlyNonEmptyArrayWithIndex2
} from "./chunk-64PLWQD3.mjs";
import {
  fromIOK,
  tapIO
} from "./chunk-TUMMPMRG.mjs";
import {
  Functor,
  do_3 as do_,
  fromOption as fromOption2,
  getApplicativeValidation,
  getCompactable,
  getFilterable,
  getSemigroup,
  isLeft as isLeft2,
  isRight,
  map,
  right as right2,
  traverseReadonlyNonEmptyArrayWithIndex
} from "./chunk-3AL4EMTU.mjs";
import {
  getApplicativeMonoid
} from "./chunk-LN4UQKIO.mjs";
import {
  chainOptionK,
  filterOrElse,
  fromEitherK,
  fromOption,
  fromOptionK,
  fromPredicate,
  tapEither
} from "./chunk-SEYMJLV6.mjs";
import {
  as,
  asUnit,
  bindTo,
  flap,
  let_
} from "./chunk-WKK6AYQI.mjs";
import {
  ap,
  apFirst,
  apS,
  apSecond,
  getApplySemigroup
} from "./chunk-ZMCLCMOU.mjs";
import {
  bind,
  tap
} from "./chunk-MDNVYLGG.mjs";
import {
  emptyReadonlyArray,
  emptyRecord,
  flatMapEither,
  flatMapIO,
  flatMapNullable,
  flatMapOption,
  flatMapTask,
  head,
  isLeft,
  isNonEmpty,
  left,
  liftNullable,
  liftOption,
  right,
  singleton,
  tail
} from "./chunk-WPJQNT3M.mjs";
import {
  SK,
  dual,
  flow,
  identity,
  pipe
} from "./chunk-ZI34HWXZ.mjs";
import {
  __export
} from "./chunk-QK4PKNB3.mjs";

// src/TaskEither.ts
var TaskEither_exports = {};
__export(TaskEither_exports, {
  Alt: () => Alt,
  ApT: () => ApT,
  ApplicativePar: () => ApplicativePar2,
  ApplicativeSeq: () => ApplicativeSeq,
  ApplyPar: () => ApplyPar2,
  ApplySeq: () => ApplySeq2,
  Bifunctor: () => Bifunctor,
  Chain: () => Chain,
  ChainRec: () => ChainRec,
  Do: () => Do,
  FromEither: () => FromEither,
  FromIO: () => FromIO,
  FromTask: () => FromTask,
  Functor: () => Functor3,
  Monad: () => Monad2,
  MonadIO: () => MonadIO,
  MonadTask: () => MonadTask,
  MonadThrow: () => MonadThrow,
  Pointed: () => Pointed2,
  URI: () => URI,
  alt: () => alt2,
  altW: () => altW,
  ap: () => ap3,
  apFirst: () => apFirst2,
  apFirstW: () => apFirstW,
  apS: () => apS2,
  apSW: () => apSW,
  apSecond: () => apSecond2,
  apSecondW: () => apSecondW,
  apW: () => apW,
  as: () => as2,
  asUnit: () => asUnit2,
  bimap: () => bimap,
  bind: () => bind2,
  bindTo: () => bindTo2,
  bindW: () => bindW,
  bracket: () => bracket,
  bracketW: () => bracketW,
  chain: () => chain,
  chainEitherK: () => chainEitherK,
  chainEitherKW: () => chainEitherKW,
  chainFirst: () => chainFirst,
  chainFirstEitherK: () => chainFirstEitherK,
  chainFirstEitherKW: () => chainFirstEitherKW,
  chainFirstIOK: () => chainFirstIOK,
  chainFirstTaskK: () => chainFirstTaskK,
  chainFirstW: () => chainFirstW,
  chainIOEitherK: () => chainIOEitherK,
  chainIOEitherKW: () => chainIOEitherKW,
  chainIOK: () => chainIOK,
  chainNullableK: () => chainNullableK2,
  chainOptionK: () => chainOptionK2,
  chainOptionKW: () => chainOptionKW,
  chainRec: () => chainRec,
  chainTaskK: () => chainTaskK,
  chainTaskOptionK: () => chainTaskOptionK,
  chainTaskOptionKW: () => chainTaskOptionKW,
  chainW: () => chainW,
  do: () => do_2,
  filterOrElse: () => filterOrElse2,
  filterOrElseW: () => filterOrElseW,
  flap: () => flap2,
  flatMap: () => flatMap3,
  flatMapEither: () => flatMapEither2,
  flatMapIO: () => flatMapIO2,
  flatMapIOEither: () => flatMapIOEither,
  flatMapNullable: () => flatMapNullable2,
  flatMapOption: () => flatMapOption2,
  flatMapTask: () => flatMapTask2,
  flatMapTaskOption: () => flatMapTaskOption,
  flatten: () => flatten,
  flattenW: () => flattenW,
  fold: () => fold,
  foldW: () => foldW,
  fromEither: () => fromEither,
  fromEitherK: () => fromEitherK2,
  fromIO: () => fromIO2,
  fromIOEither: () => fromIOEither,
  fromIOEitherK: () => fromIOEitherK,
  fromIOK: () => fromIOK2,
  fromNullable: () => fromNullable2,
  fromNullableK: () => fromNullableK2,
  fromOption: () => fromOption3,
  fromOptionK: () => fromOptionK2,
  fromPredicate: () => fromPredicate2,
  fromTask: () => fromTask,
  fromTaskK: () => fromTaskK2,
  fromTaskOption: () => fromTaskOption,
  fromTaskOptionK: () => fromTaskOptionK,
  getAltTaskValidation: () => getAltTaskValidation,
  getApplicativeTaskValidation: () => getApplicativeTaskValidation,
  getApplyMonoid: () => getApplyMonoid,
  getApplySemigroup: () => getApplySemigroup2,
  getCompactable: () => getCompactable2,
  getFilterable: () => getFilterable2,
  getOrElse: () => getOrElse2,
  getOrElseW: () => getOrElseW,
  getSemigroup: () => getSemigroup2,
  getTaskValidation: () => getTaskValidation,
  left: () => left3,
  leftIO: () => leftIO,
  leftTask: () => leftTask,
  let: () => let_2,
  liftNullable: () => liftNullable2,
  liftOption: () => liftOption2,
  map: () => map4,
  mapBoth: () => mapBoth2,
  mapError: () => mapError2,
  mapLeft: () => mapLeft,
  match: () => match2,
  matchE: () => matchE2,
  matchEW: () => matchEW,
  matchW: () => matchW,
  of: () => of2,
  orElse: () => orElse2,
  orElseFirst: () => orElseFirst,
  orElseFirstIOK: () => orElseFirstIOK,
  orElseFirstTaskK: () => orElseFirstTaskK,
  orElseFirstW: () => orElseFirstW,
  orElseW: () => orElseW,
  orLeft: () => orLeft2,
  right: () => right4,
  rightIO: () => rightIO,
  rightTask: () => rightTask,
  sequenceArray: () => sequenceArray,
  sequenceSeqArray: () => sequenceSeqArray,
  swap: () => swap2,
  tap: () => tap2,
  tapEither: () => tapEither2,
  tapError: () => tapError2,
  tapIO: () => tapIO2,
  tapTask: () => tapTask2,
  taskEither: () => taskEither,
  taskEitherSeq: () => taskEitherSeq,
  taskify: () => taskify,
  throwError: () => throwError,
  toUnion: () => toUnion2,
  traverseArray: () => traverseArray,
  traverseArrayWithIndex: () => traverseArrayWithIndex,
  traverseReadonlyArrayWithIndex: () => traverseReadonlyArrayWithIndex,
  traverseReadonlyArrayWithIndexSeq: () => traverseReadonlyArrayWithIndexSeq,
  traverseReadonlyNonEmptyArrayWithIndex: () => traverseReadonlyNonEmptyArrayWithIndex3,
  traverseReadonlyNonEmptyArrayWithIndexSeq: () => traverseReadonlyNonEmptyArrayWithIndexSeq,
  traverseSeqArray: () => traverseSeqArray,
  traverseSeqArrayWithIndex: () => traverseSeqArrayWithIndex,
  tryCatch: () => tryCatch,
  tryCatchK: () => tryCatchK
});
var left3 = /* @__PURE__ */ left2(Pointed);
var right4 = /* @__PURE__ */ right3(Pointed);
var rightTask = /* @__PURE__ */ rightF(Functor2);
var leftTask = /* @__PURE__ */ leftF(Functor2);
var rightIO = /* @__PURE__ */ flow(fromIO, rightTask);
var leftIO = /* @__PURE__ */ flow(fromIO, leftTask);
var fromIO2 = rightIO;
var fromTask = rightTask;
var fromEither = of;
var fromIOEither = fromIO;
var fromTaskOption = (onNone) => map3(fromOption2(onNone));
var match2 = /* @__PURE__ */ match(Functor2);
var matchW = match2;
var matchE2 = /* @__PURE__ */ matchE(Monad);
var fold = matchE2;
var matchEW = matchE2;
var foldW = matchEW;
var getOrElse2 = /* @__PURE__ */ getOrElse(Monad);
var getOrElseW = getOrElse2;
var tryCatch = (f, onRejected) => async () => {
  try {
    return await f().then(right);
  } catch (reason) {
    return left(onRejected(reason));
  }
};
var tryCatchK = (f, onRejected) => (...a) => tryCatch(() => f(...a), onRejected);
var toUnion2 = /* @__PURE__ */ toUnion(Functor2);
var fromNullable2 = /* @__PURE__ */ fromNullable(
  Pointed
);
var fromNullableK2 = /* @__PURE__ */ fromNullableK(Pointed);
var chainNullableK2 = /* @__PURE__ */ chainNullableK(Monad);
var orElse2 = /* @__PURE__ */ orElse(Monad);
var orElseW = orElse2;
var tapError2 = /* @__PURE__ */ dual(2, tapError(Monad));
var orElseFirstIOK = (onLeft) => tapError2(fromIOK2(onLeft));
var orElseFirstTaskK = (onLeft) => tapError2(fromTaskK2(onLeft));
var orLeft2 = /* @__PURE__ */ orLeft(Monad);
var swap2 = /* @__PURE__ */ swap(Functor2);
var fromTaskOptionK = (onNone) => {
  const from = fromTaskOption(onNone);
  return (f) => flow(f, from);
};
var chainTaskOptionKW = (onNone) => (f) => (ma) => flatMap3(ma, fromTaskOptionK(onNone)(f));
var chainTaskOptionK = chainTaskOptionKW;
var fromIOEitherK = (f) => flow(f, fromIOEither);
var _map = (fa, f) => pipe(fa, map4(f));
var _apPar = (fab, fa) => pipe(fab, ap3(fa));
var _apSeq = (fab, fa) => flatMap3(fab, (f) => pipe(fa, map4(f)));
var _alt = (fa, that) => pipe(fa, alt2(that));
var map4 = /* @__PURE__ */ map2(
  Functor2
);
var mapBoth2 = /* @__PURE__ */ dual(3, mapBoth(Functor2));
var bimap = mapBoth2;
var mapError2 = /* @__PURE__ */ dual(2, mapError(Functor2));
var mapLeft = mapError2;
var ap3 = /* @__PURE__ */ ap2(ApplyPar);
var apW = ap3;
var flatMap3 = /* @__PURE__ */ dual(2, flatMap(Monad));
var flattenW = /* @__PURE__ */ flatMap3(identity);
var flatten = flattenW;
var alt2 = /* @__PURE__ */ alt(Monad);
var altW = alt2;
var of2 = right4;
var throwError = left3;
var URI = "TaskEither";
function getApplicativeTaskValidation(A, S) {
  const ap4 = ap(A, getApplicativeValidation(S));
  return {
    URI,
    _E: void 0,
    map: _map,
    ap: (fab, fa) => pipe(fab, ap4(fa)),
    of: of2
  };
}
function getAltTaskValidation(S) {
  const alt3 = altValidation(Monad, S);
  return {
    URI,
    _E: void 0,
    map: _map,
    alt: (fa, that) => pipe(fa, alt3(that))
  };
}
var getCompactable2 = (M) => {
  const C = getCompactable(M);
  return {
    URI,
    _E: void 0,
    compact: compact(Functor2, C),
    separate: separate(Functor2, C, Functor)
  };
};
function getFilterable2(M) {
  const F = getFilterable(M);
  const C = getCompactable2(M);
  const filter2 = filter(Functor2, F);
  const filterMap2 = filterMap(Functor2, F);
  const partition2 = partition(Functor2, F);
  const partitionMap2 = partitionMap(Functor2, F);
  return {
    URI,
    _E: void 0,
    map: _map,
    compact: C.compact,
    separate: C.separate,
    filter: (fa, predicate) => pipe(fa, filter2(predicate)),
    filterMap: (fa, f) => pipe(fa, filterMap2(f)),
    partition: (fa, predicate) => pipe(fa, partition2(predicate)),
    partitionMap: (fa, f) => pipe(fa, partitionMap2(f))
  };
}
var Functor3 = {
  URI,
  map: _map
};
var as2 = dual(2, as(Functor3));
var asUnit2 = asUnit(Functor3);
var flap2 = /* @__PURE__ */ flap(Functor3);
var Pointed2 = {
  URI,
  of: of2
};
var ApplyPar2 = {
  URI,
  map: _map,
  ap: _apPar
};
var apFirst2 = /* @__PURE__ */ apFirst(ApplyPar2);
var apFirstW = apFirst2;
var apSecond2 = /* @__PURE__ */ apSecond(ApplyPar2);
var apSecondW = apSecond2;
var ApplicativePar2 = {
  URI,
  map: _map,
  ap: _apPar,
  of: of2
};
var ApplySeq2 = {
  URI,
  map: _map,
  ap: _apSeq
};
var ApplicativeSeq = {
  URI,
  map: _map,
  ap: _apSeq,
  of: of2
};
var Chain = {
  URI,
  map: _map,
  ap: _apPar,
  chain: flatMap3
};
var chainRec = (a, f) => async () => {
  let current = await f(a)();
  while (true) {
    if (isRight(current) && isLeft2(current.right)) {
      current = await f(current.right.left)();
      continue;
    }
    if (isLeft2(current)) {
      return current;
    }
    if (isRight(current.right)) {
      return right2(current.right.right);
    }
  }
};
var ChainRec = {
  ...Chain,
  chainRec
};
var Monad2 = {
  URI,
  map: _map,
  ap: _apPar,
  chain: flatMap3,
  of: of2
};
var MonadIO = {
  URI,
  map: _map,
  ap: _apPar,
  chain: flatMap3,
  of: of2,
  fromIO: fromIO2
};
var MonadTask = {
  URI,
  map: _map,
  ap: _apPar,
  chain: flatMap3,
  of: of2,
  fromIO: fromIO2,
  fromTask
};
var MonadThrow = {
  URI,
  map: _map,
  ap: _apPar,
  chain: flatMap3,
  of: of2,
  throwError
};
var FromEither = {
  URI,
  fromEither
};
var FromIO = {
  URI,
  fromIO: fromIO2
};
var FromTask = {
  URI,
  fromIO: fromIO2,
  fromTask
};
var tap2 = /* @__PURE__ */ dual(2, tap(Chain));
var tapEither2 = /* @__PURE__ */ dual(2, tapEither(FromEither, Chain));
var tapIO2 = /* @__PURE__ */ dual(2, tapIO(FromIO, Chain));
var tapTask2 = /* @__PURE__ */ dual(2, tapTask(FromTask, Chain));
var Bifunctor = {
  URI,
  bimap: mapBoth2,
  mapLeft: mapError2
};
var Alt = {
  URI,
  map: _map,
  alt: _alt
};
var fromOption3 = /* @__PURE__ */ fromOption(FromEither);
var fromOptionK2 = /* @__PURE__ */ fromOptionK(FromEither);
var chainOptionK2 = /* @__PURE__ */ chainOptionK(
  FromEither,
  Chain
);
var chainOptionKW = chainOptionK2;
var _FromEither = {
  fromEither: FromEither.fromEither
};
var liftNullable2 = /* @__PURE__ */ liftNullable(_FromEither);
var liftOption2 = /* @__PURE__ */ liftOption(_FromEither);
var _FlatMap = {
  flatMap: flatMap3
};
var _FromIO = {
  fromIO: FromIO.fromIO
};
var _FromTask = {
  fromTask
};
var flatMapNullable2 = /* @__PURE__ */ flatMapNullable(_FromEither, _FlatMap);
var flatMapOption2 = /* @__PURE__ */ flatMapOption(_FromEither, _FlatMap);
var flatMapEither2 = /* @__PURE__ */ flatMapEither(_FromEither, _FlatMap);
var flatMapIO2 = /* @__PURE__ */ flatMapIO(_FromIO, _FlatMap);
var flatMapTask2 = /* @__PURE__ */ flatMapTask(_FromTask, _FlatMap);
var flatMapIOEither = /* @__PURE__ */ dual(
  2,
  (self, f) => flatMap3(self, fromIOEitherK(f))
);
var flatMapTaskOption = /* @__PURE__ */ dual(
  3,
  (self, f, onNone) => flatMap3(self, (a) => fromTaskOption(() => onNone(a))(f(a)))
);
var chainEitherK = flatMapEither2;
var chainEitherKW = flatMapEither2;
var chainFirstEitherK = tapEither2;
var chainFirstEitherKW = tapEither2;
var fromPredicate2 = /* @__PURE__ */ fromPredicate(FromEither);
var filterOrElse2 = /* @__PURE__ */ filterOrElse(FromEither, Chain);
var filterOrElseW = filterOrElse2;
var fromEitherK2 = /* @__PURE__ */ fromEitherK(FromEither);
var fromIOK2 = /* @__PURE__ */ fromIOK(FromIO);
var chainIOK = flatMapIO2;
var chainFirstIOK = tapIO2;
var fromTaskK2 = /* @__PURE__ */ fromTaskK(FromTask);
var chainTaskK = flatMapTask2;
var chainFirstTaskK = tapTask2;
var chainIOEitherKW = flatMapIOEither;
var chainIOEitherK = flatMapIOEither;
function taskify(f) {
  return function() {
    const args = Array.prototype.slice.call(arguments);
    return () => new Promise((resolve) => {
      const cbResolver = (e, r) => e != null ? resolve(left(e)) : resolve(right(r));
      f.apply(null, args.concat(cbResolver));
    });
  };
}
var bracket = (acquire, use, release) => bracketW(acquire, use, release);
var bracketW = (acquire, use, release) => flatMap3(acquire, (a) => flatMap2(use(a), (e) => flatMap3(release(a, e), () => of(e))));
var Do = /* @__PURE__ */ of2(emptyRecord);
var bindTo2 = /* @__PURE__ */ bindTo(Functor3);
var let_2 = /* @__PURE__ */ let_(Functor3);
var bind2 = /* @__PURE__ */ bind(Chain);
var bindW = bind2;
var do_2 = do_(Pointed2, ChainRec);
var apS2 = /* @__PURE__ */ apS(ApplyPar2);
var apSW = apS2;
var ApT = /* @__PURE__ */ of2(emptyReadonlyArray);
var traverseReadonlyNonEmptyArrayWithIndex3 = (f) => flow(traverseReadonlyNonEmptyArrayWithIndex2(f), map3(traverseReadonlyNonEmptyArrayWithIndex(SK)));
var traverseReadonlyArrayWithIndex = (f) => {
  const g = traverseReadonlyNonEmptyArrayWithIndex3(f);
  return (as3) => isNonEmpty(as3) ? g(as3) : ApT;
};
var traverseReadonlyNonEmptyArrayWithIndexSeq = (f) => (as3) => () => tail(as3).reduce(
  (acc, a, i) => acc.then(
    (ebs) => isLeft(ebs) ? acc : f(i + 1, a)().then((eb) => {
      if (isLeft(eb)) {
        return eb;
      }
      ebs.right.push(eb.right);
      return ebs;
    })
  ),
  f(0, head(as3))().then(map(singleton))
);
var traverseReadonlyArrayWithIndexSeq = (f) => {
  const g = traverseReadonlyNonEmptyArrayWithIndexSeq(f);
  return (as3) => isNonEmpty(as3) ? g(as3) : ApT;
};
var traverseArrayWithIndex = traverseReadonlyArrayWithIndex;
var traverseArray = (f) => traverseReadonlyArrayWithIndex((_, a) => f(a));
var sequenceArray = /* @__PURE__ */ traverseArray(identity);
var traverseSeqArrayWithIndex = traverseReadonlyArrayWithIndexSeq;
var traverseSeqArray = (f) => traverseReadonlyArrayWithIndexSeq((_, a) => f(a));
var sequenceSeqArray = /* @__PURE__ */ traverseSeqArray(identity);
var chain = flatMap3;
var chainW = flatMap3;
var chainFirst = tap2;
var chainFirstW = tap2;
var orElseFirst = tapError2;
var orElseFirstW = tapError2;
var taskEither = {
  URI,
  bimap: mapBoth2,
  mapLeft: mapError2,
  map: _map,
  of: of2,
  ap: _apPar,
  chain: flatMap3,
  alt: _alt,
  fromIO: fromIO2,
  fromTask,
  throwError
};
var taskEitherSeq = {
  URI,
  bimap: mapBoth2,
  mapLeft: mapError2,
  map: _map,
  of: of2,
  ap: _apSeq,
  chain: flatMap3,
  alt: _alt,
  fromIO: fromIO2,
  fromTask,
  throwError
};
var getApplySemigroup2 = /* @__PURE__ */ getApplySemigroup(ApplySeq2);
var getApplyMonoid = /* @__PURE__ */ getApplicativeMonoid(ApplicativeSeq);
var getSemigroup2 = (S) => getApplySemigroup(ApplySeq)(getSemigroup(S));
function getTaskValidation(SE) {
  const applicativeTaskValidation = getApplicativeTaskValidation(ApplicativePar, SE);
  const altTaskValidation = getAltTaskValidation(SE);
  return {
    URI,
    _E: void 0,
    map: _map,
    ap: applicativeTaskValidation.ap,
    of: of2,
    chain: flatMap3,
    bimap: mapBoth2,
    mapLeft: mapError2,
    alt: altTaskValidation.alt,
    fromIO: fromIO2,
    fromTask,
    throwError
  };
}

export {
  left3 as left,
  right4 as right,
  rightTask,
  leftTask,
  rightIO,
  leftIO,
  fromIO2 as fromIO,
  fromTask,
  fromEither,
  fromIOEither,
  fromTaskOption,
  match2 as match,
  matchW,
  matchE2 as matchE,
  fold,
  matchEW,
  foldW,
  getOrElse2 as getOrElse,
  getOrElseW,
  tryCatch,
  tryCatchK,
  toUnion2 as toUnion,
  fromNullable2 as fromNullable,
  fromNullableK2 as fromNullableK,
  chainNullableK2 as chainNullableK,
  orElse2 as orElse,
  orElseW,
  tapError2 as tapError,
  orElseFirstIOK,
  orElseFirstTaskK,
  orLeft2 as orLeft,
  swap2 as swap,
  fromTaskOptionK,
  chainTaskOptionKW,
  chainTaskOptionK,
  fromIOEitherK,
  map4 as map,
  mapBoth2 as mapBoth,
  bimap,
  mapError2 as mapError,
  mapLeft,
  ap3 as ap,
  apW,
  flatMap3 as flatMap,
  flattenW,
  flatten,
  alt2 as alt,
  altW,
  of2 as of,
  throwError,
  URI,
  getApplicativeTaskValidation,
  getAltTaskValidation,
  getCompactable2 as getCompactable,
  getFilterable2 as getFilterable,
  Functor3 as Functor,
  as2 as as,
  asUnit2 as asUnit,
  flap2 as flap,
  Pointed2 as Pointed,
  ApplyPar2 as ApplyPar,
  apFirst2 as apFirst,
  apFirstW,
  apSecond2 as apSecond,
  apSecondW,
  ApplicativePar2 as ApplicativePar,
  ApplySeq2 as ApplySeq,
  ApplicativeSeq,
  Chain,
  chainRec,
  ChainRec,
  Monad2 as Monad,
  MonadIO,
  MonadTask,
  MonadThrow,
  FromEither,
  FromIO,
  FromTask,
  tap2 as tap,
  tapEither2 as tapEither,
  tapIO2 as tapIO,
  tapTask2 as tapTask,
  Bifunctor,
  Alt,
  fromOption3 as fromOption,
  fromOptionK2 as fromOptionK,
  chainOptionK2 as chainOptionK,
  chainOptionKW,
  liftNullable2 as liftNullable,
  liftOption2 as liftOption,
  flatMapNullable2 as flatMapNullable,
  flatMapOption2 as flatMapOption,
  flatMapEither2 as flatMapEither,
  flatMapIO2 as flatMapIO,
  flatMapTask2 as flatMapTask,
  flatMapIOEither,
  flatMapTaskOption,
  chainEitherK,
  chainEitherKW,
  chainFirstEitherK,
  chainFirstEitherKW,
  fromPredicate2 as fromPredicate,
  filterOrElse2 as filterOrElse,
  filterOrElseW,
  fromEitherK2 as fromEitherK,
  fromIOK2 as fromIOK,
  chainIOK,
  chainFirstIOK,
  fromTaskK2 as fromTaskK,
  chainTaskK,
  chainFirstTaskK,
  chainIOEitherKW,
  chainIOEitherK,
  taskify,
  bracket,
  bracketW,
  Do,
  bindTo2 as bindTo,
  let_2 as let_,
  bind2 as bind,
  bindW,
  do_2 as do_,
  apS2 as apS,
  apSW,
  ApT,
  traverseReadonlyNonEmptyArrayWithIndex3 as traverseReadonlyNonEmptyArrayWithIndex,
  traverseReadonlyArrayWithIndex,
  traverseReadonlyNonEmptyArrayWithIndexSeq,
  traverseReadonlyArrayWithIndexSeq,
  traverseArrayWithIndex,
  traverseArray,
  sequenceArray,
  traverseSeqArrayWithIndex,
  traverseSeqArray,
  sequenceSeqArray,
  chain,
  chainW,
  chainFirst,
  chainFirstW,
  orElseFirst,
  orElseFirstW,
  taskEither,
  taskEitherSeq,
  getApplySemigroup2 as getApplySemigroup,
  getApplyMonoid,
  getSemigroup2 as getSemigroup,
  getTaskValidation,
  TaskEither_exports
};
