import * as E from "../../../Either"; import type { Option } from "../../../Option"; import type { Cause } from "../../Exit/Cause"; import * as T from "../../Task"; export type Push = ( _: Option> ) => T.Task, ReadonlyArray], void>; export const emit = (z: Z, leftover: ReadonlyArray): T.EIO<[E.Either, ReadonlyArray], never> => T.fail([E.right(z), leftover]); export const more = T.unit(); export const fail = (e: E, leftover: ReadonlyArray): T.EIO<[E.Either, ReadonlyArray], never> => T.fail([E.left(e), leftover]); export const halt = (c: Cause): T.EIO<[E.Either, ReadonlyArray], never> => T.first_(T.halt(c), (e) => [E.left(e), []]);