/** * @since 2.0.0 */ import { ApplicativeComposition12, ApplicativeComposition22, ApplicativeCompositionHKT2 } from './Applicative' import * as E from './Either' import { Lazy } from './function' import { HKT, Kind, Kind2, URIS, URIS2 } from './HKT' import { Monad, Monad1, Monad2 } from './Monad' import Either = E.Either import URI = E.URI /** * @category model * @since 2.0.0 */ export interface EitherT extends HKT> {} /** * @since 2.0.0 */ export interface EitherM extends ApplicativeCompositionHKT2 { readonly chain: (ma: EitherT, f: (a: A) => EitherT) => EitherT readonly alt: (fa: EitherT, that: Lazy>) => EitherT readonly bimap: (ma: EitherT, f: (e: E) => N, g: (a: A) => B) => EitherT readonly mapLeft: (ma: EitherT, f: (e: E) => N) => EitherT readonly fold: (ma: EitherT, onLeft: (e: E) => HKT, onRight: (a: A) => HKT) => HKT readonly getOrElse: (ma: EitherT, onLeft: (e: E) => HKT) => HKT readonly orElse: (ma: EitherT, onLeft: (e: E) => EitherT) => EitherT readonly swap: (ma: EitherT) => EitherT readonly rightM: (ma: HKT) => EitherT readonly leftM: (me: HKT) => EitherT readonly left: (e: E) => EitherT } /** * @category model * @since 2.0.0 */ export declare type EitherT1 = Kind> /** * @since 2.0.0 */ export interface EitherM1 extends ApplicativeComposition12 { readonly chain: (ma: EitherT1, f: (a: A) => EitherT1) => EitherT1 readonly alt: (fa: EitherT1, that: Lazy>) => EitherT1 readonly bimap: (ma: EitherT1, f: (e: E) => N, g: (a: A) => B) => EitherT1 readonly mapLeft: (ma: EitherT1, f: (e: E) => N) => EitherT1 readonly fold: ( ma: EitherT1, onLeft: (e: E) => Kind, onRight: (a: A) => Kind ) => Kind readonly getOrElse: (ma: EitherT1, onLeft: (e: E) => Kind) => Kind readonly orElse: (ma: EitherT1, onLeft: (e: E) => EitherT1) => EitherT1 readonly swap: (ma: EitherT1) => EitherT1 readonly rightM: (ma: Kind) => EitherT1 readonly leftM: (me: Kind) => EitherT1 readonly left: (e: E) => EitherT1 } /** * @category model * @since 2.0.0 */ export declare type EitherT2 = Kind2> /** * @since 2.0.0 */ export interface EitherM2 extends ApplicativeComposition22 { readonly chain: (ma: EitherT2, f: (a: A) => EitherT2) => EitherT2 readonly alt: (fa: EitherT2, that: Lazy>) => EitherT2 readonly bimap: (ma: EitherT2, f: (e: E) => N, g: (a: A) => B) => EitherT2 readonly mapLeft: (ma: EitherT2, f: (e: E) => N) => EitherT2 readonly fold: ( ma: EitherT2, onLeft: (e: E) => Kind2, onRight: (a: A) => Kind2 ) => Kind2 readonly getOrElse: (ma: EitherT2, onLeft: (e: E) => Kind2) => Kind2 readonly orElse: ( ma: EitherT2, onLeft: (e: E) => EitherT2 ) => EitherT2 readonly swap: (ma: EitherT2) => EitherT2 readonly rightM: (ma: Kind2) => EitherT2 readonly leftM: (me: Kind2) => EitherT2 readonly left: (e: E) => EitherT2 } /** * @since 2.0.0 */ export declare function getEitherM(M: Monad2): EitherM2 export declare function getEitherM(M: Monad1): EitherM1 export declare function getEitherM(M: Monad): EitherM