/** * @since 2.4.0 */ import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from './HKT.js'; import { Monad, Monad1, Monad2, Monad2C, Monad3 } from './Monad.js'; import { Monoid } from './Monoid.js'; /** * @category model * @since 2.4.0 */ export interface WriterT { (): HKT; } /** * @since 2.4.0 */ export interface WriterM { readonly map: (fa: WriterT, f: (a: A) => B) => WriterT; readonly evalWriter: (fa: WriterT) => HKT; readonly execWriter: (fa: WriterT) => HKT; readonly tell: (w: W) => WriterT; readonly listen: (fa: WriterT) => WriterT; readonly pass: (fa: WriterT W]>) => WriterT; readonly listens: (fa: WriterT, f: (w: W) => B) => WriterT; readonly censor: (fa: WriterT, f: (w: W) => W) => WriterT; readonly getMonad: (M: Monoid) => { readonly _E: W; readonly map: (ma: WriterT, f: (a: A) => B) => WriterT; readonly of: (a: A) => WriterT; readonly ap: (mab: WriterT B>, ma: WriterT) => WriterT; readonly chain: (ma: WriterT, f: (a: A) => WriterT) => WriterT; }; } /** * @category model * @since 2.4.0 */ export interface WriterT1 { (): Kind; } /** * @since 2.4.0 */ export interface WriterM1 { readonly map: (fa: WriterT1, f: (a: A) => B) => WriterT1; readonly evalWriter: (fa: WriterT1) => Kind; readonly execWriter: (fa: WriterT1) => Kind; readonly tell: (w: W) => WriterT1; readonly listen: (fa: WriterT1) => WriterT1; readonly pass: (fa: WriterT1 W]>) => WriterT1; readonly listens: (fa: WriterT1, f: (w: W) => B) => WriterT1; readonly censor: (fa: WriterT1, f: (w: W) => W) => WriterT1; readonly getMonad: (M: Monoid) => { readonly _E: W; readonly map: (ma: WriterT1, f: (a: A) => B) => WriterT1; readonly of: (a: A) => WriterT1; readonly ap: (mab: WriterT1 B>, ma: WriterT1) => WriterT1; readonly chain: (ma: WriterT1, f: (a: A) => WriterT1) => WriterT1; }; } /** * @category model * @since 2.4.0 */ export interface WriterT2 { (): Kind2; } /** * @since 2.4.0 */ export interface WriterM2 { readonly map: (fa: WriterT2, f: (a: A) => B) => WriterT2; readonly evalWriter: (fa: WriterT2) => Kind2; readonly execWriter: (fa: WriterT2) => Kind2; readonly tell: (w: W) => WriterT2; readonly listen: (fa: WriterT2) => WriterT2; readonly pass: (fa: WriterT2 W]>) => WriterT2; readonly listens: (fa: WriterT2, f: (w: W) => B) => WriterT2; readonly censor: (fa: WriterT2, f: (w: W) => W) => WriterT2; readonly getMonad: (M: Monoid) => { readonly _E: W; readonly map: (ma: WriterT2, f: (a: A) => B) => WriterT2; readonly of: (a: A) => WriterT2; readonly ap: (mab: WriterT2 B>, ma: WriterT2) => WriterT2; readonly chain: (ma: WriterT2, f: (a: A) => WriterT2) => WriterT2; }; } /** * @since 2.4.0 */ export interface WriterM2C { readonly map: (fa: WriterT2, f: (a: A) => B) => WriterT2; readonly evalWriter: (fa: WriterT2) => Kind2; readonly execWriter: (fa: WriterT2) => Kind2; readonly tell: (w: W) => WriterT2; readonly listen: (fa: WriterT2) => WriterT2; readonly pass: (fa: WriterT2 W]>) => WriterT2; readonly listens: (fa: WriterT2, f: (w: W) => B) => WriterT2; readonly censor: (fa: WriterT2, f: (w: W) => W) => WriterT2; readonly getMonad: (M: Monoid) => { readonly _E: W; readonly map: (ma: WriterT2, f: (a: A) => B) => WriterT2; readonly of: (a: A) => WriterT2; readonly ap: (mab: WriterT2 B>, ma: WriterT2) => WriterT2; readonly chain: (ma: WriterT2, f: (a: A) => WriterT2) => WriterT2; }; } /** * @since 2.4.0 */ export interface WriterT3 { (): Kind3; } /** * @since 2.4.0 */ export interface WriterM3 { readonly map: (fa: WriterT3, f: (a: A) => B) => WriterT3; readonly evalWriter: (fa: WriterT3) => Kind3; readonly execWriter: (fa: WriterT3) => Kind3; readonly tell: (w: W) => WriterT3; readonly listen: (fa: WriterT3) => WriterT3; readonly pass: (fa: WriterT3 W]>) => WriterT3; readonly listens: (fa: WriterT3, f: (w: W) => B) => WriterT3; readonly censor: (fa: WriterT3, f: (w: W) => W) => WriterT3; readonly getMonad: (M: Monoid) => { readonly _E: W; readonly map: (ma: WriterT3, f: (a: A) => B) => WriterT3; readonly of: (a: A) => WriterT3; readonly ap: (mab: WriterT3 B>, ma: WriterT3) => WriterT3; readonly chain: (ma: WriterT3, f: (a: A) => WriterT3) => WriterT3; }; } /** * @since 2.4.0 */ export declare function getWriterM(M: Monad3): WriterM3; export declare function getWriterM(M: Monad2): WriterM2; export declare function getWriterM(M: Monad2C): WriterM2C; export declare function getWriterM(M: Monad1): WriterM1; export declare function getWriterM(M: Monad): WriterM;