import "../Operator/index.js"; /** * The `Const` type constructor, which wraps its first type argument and ignores its second. * That is, `Const` is isomorphic to `E` for any `A`. * * `Const` has some useful instances. For example, the `Applicative` instance allows us to collect results using a `Monoid` * while ignoring return values. */ import type * as As from "../Associative/index.js"; import type { Bounded } from "../Bounded/index.js"; import type { Equal } from "../Equal/index.js"; import type * as Id from "../Identity/index.js"; import type { Ord } from "../Ord/index.js"; import type { URI } from "../Prelude/index.js"; import * as P from "../Prelude/index.js"; import type { Show } from "../Show/index.js"; /** * The `Const` type constructor, which wraps its first type argument and ignores its second. * That is, `Const` is isomorphic to `E` for any `A`. * * `Const` has some useful instances. For example, the `Applicative` instance allows us to collect results using a `Identity` * while ignoring return values. */ export declare type Const = E & { readonly _A: A; }; /** * Map + MapLeft */ export declare function bimap_(fea: Const, f: (e: E) => G, g: (a: A) => B): Const; /** * Map + MapLeft */ export declare function bimap(f: (e: E) => G, g: (a: A) => B): (fa: Const) => Const; /** * Contramap input */ export declare const contramap_: (fa: Const, f: (b: B) => A) => Const; /** * Contramap input */ export declare function contramap(f: (b: B) => A): (fa: Const) => Const; /** * The `Any` instance for `Const[E, +_]` */ export declare function getAny(e: E): P.Any<[URI<"Const", {}>], P.Fix<"E", E>>; /** * The `AssociativeBoth` instance for `Const[E, +_]` */ export declare function getAssociativeBoth(A: As.Associative): P.AssociativeBoth<[URI<"Const", {}>], P.Fix<"E", E>>; /** * The `Contravariant` instance for `Const[+_, +_]` */ export declare const Contravariant: P.Contravariant<[URI<"Const", {}>], P.V<"E", "+">>; /** * The `Covariant` instance for `Const[E, +_]` */ export declare const Covariant: P.Covariant<[URI<"Const", {}>], P.V<"E", "+">>; /** * The `IdentityBoth` instance for `Const[E, +_]` */ export declare function getIdentityBoth(I: Id.Identity): P.IdentityBoth<[URI<"Const", {}>], P.Fix<"E", E>>; /** * The `Applicative` instance for `Const[E, +_]` */ export declare function getApplicative(I: Id.Identity): P.Applicative<[URI<"Const", {}>], P.Fix<"E", E>>; /** * The `Show` instance for `Const[E, +_]` */ export declare function getShow(S: Show): () => Show>; /** * The `Bounded` instance for `Const[E, +_]` */ export declare function getBounded(B: Bounded): () => Bounded>; /** * The `Equal` instance for `Const[E, +_]` */ export declare function getEqual(E: Equal): () => Equal>; /** * The `Identity` instance for `Const[E, +_]` */ export declare function getIdentity(I: Id.Identity): () => Id.Identity>; /** * The `Ord` instance for `Const[E, +_]` */ export declare function getOrd(O: Ord): () => Ord>; /** * The `Associative` instance for `Const[E, +_]` */ export declare function getAssociative(A: As.Associative): () => As.Associative>; /** * Construct `Const[E, A]` */ export declare const makeConst: (e: E) => () => Const; /** * Maps `Const[E, A]` to `Const[E, B]` via `f : A => B` * * @ets_optimize identity */ export declare const map_: (fa: Const, f: (a: A) => B) => Const; /** * Maps `Const[E, A]` to `Const[E, B]` via `f : A => B` */ export declare function map(f: (a: A) => B): { /** * @ets_optimize identity */ (fa: Const): Const; }; /** * Maps `Const[E, A]` to `Const[E1, A]` via `f : E => E1` */ export declare const mapLeft_: (fea: Const, f: (e: E) => G) => Const; /** * Maps `Const[E, A]` to `Const[E1, A]` via `f : E => E1` */ export declare function mapLeft(f: (e: E) => G): { (fa: Const): Const; }; //# sourceMappingURL=index.d.ts.map