/** * Lift a computation from the `State` monad. * * @since 2.11.0 */ import { Chain, Chain2, Chain3, Chain4 } from './Chain' import { Endomorphism } from './Endomorphism' import { HKT2, Kind2, Kind3, Kind4, URIS2, URIS3, URIS4 } from './HKT' import * as S from './State' import State = S.State /** * @category model * @since 2.11.0 */ export interface FromState { readonly URI: F readonly fromState: (fa: State) => HKT2 } /** * @category model * @since 2.11.0 */ export interface FromState2 { readonly URI: F readonly fromState: (fa: State) => Kind2 } /** * @category model * @since 2.11.0 */ export interface FromState3 { readonly URI: F readonly fromState: (fa: State) => Kind3 } /** * @category model * @since 2.11.0 */ export interface FromState3C { readonly URI: F readonly _E: E readonly fromState: (fa: State) => Kind3 } /** * @category model * @since 2.11.0 */ export interface FromState4 { readonly URI: F readonly fromState: (fa: State) => Kind4 } /** * @category constructors * @since 2.11.0 */ export declare function get(F: FromState4): () => Kind4 export declare function get(F: FromState3): () => Kind3 export declare function get(F: FromState3C): () => Kind3 export declare function get(F: FromState2): () => Kind2 export declare function get(F: FromState): () => HKT2 /** * @category constructors * @since 2.11.0 */ export declare function put(F: FromState4): (s: S) => Kind4 export declare function put(F: FromState3): (s: S) => Kind3 export declare function put(F: FromState3C): (s: S) => Kind3 export declare function put(F: FromState2): (s: S) => Kind2 export declare function put(F: FromState): (s: S) => HKT2 /** * @category constructors * @since 2.11.0 */ export declare function modify( F: FromState4 ): (f: Endomorphism) => Kind4 export declare function modify(F: FromState3): (f: Endomorphism) => Kind3 export declare function modify( F: FromState3C ): (f: Endomorphism) => Kind3 export declare function modify(F: FromState2): (f: Endomorphism) => Kind2 export declare function modify(F: FromState): (f: Endomorphism) => HKT2 /** * @category constructors * @since 2.11.0 */ export declare function gets(F: FromState4): (f: (s: S) => A) => Kind4 export declare function gets(F: FromState3): (f: (s: S) => A) => Kind3 export declare function gets(F: FromState3C): (f: (s: S) => A) => Kind3 export declare function gets(F: FromState2): (f: (s: S) => A) => Kind2 export declare function gets(F: FromState): (f: (s: S) => A) => HKT2 /** * @since 2.11.0 */ export declare function fromStateK( F: FromState4 ): , S, B>(f: (...a: A) => State) => (...a: A) => Kind4 export declare function fromStateK( F: FromState3 ): , S, B>(f: (...a: A) => State) => (...a: A) => Kind3 export declare function fromStateK( F: FromState3C ): , S, B>(f: (...a: A) => State) => (...a: A) => Kind3 export declare function fromStateK( F: FromState2 ): , S, B>(f: (...a: A) => State) => (...a: A) => Kind2 export declare function fromStateK( F: FromState ): , S, B>(f: (...a: A) => State) => (...a: A) => HKT2 /** * @since 2.11.0 */ export declare function chainStateK( F: FromState4, M: Chain4 ): (f: (a: A) => State) => (ma: Kind4) => Kind4 export declare function chainStateK( F: FromState3, M: Chain3 ): (f: (a: A) => State) => (ma: Kind3) => Kind3 export declare function chainStateK( F: FromState2, M: Chain2 ): (f: (a: A) => State) => (ma: Kind2) => Kind2 export declare function chainStateK( F: FromState, M: Chain ): (f: (a: A) => State) => (ma: HKT2) => HKT2