/**
 * IR Type Substitution -- Core Operations
 *
 * Provides containsTypeParameter, unify, and typesEqual.
 * These are the foundational type-analysis operations used by
 * both substitution and builder modules.
 */
import type { IrType } from "./ir-types.js";
/**
 * Check if an IrType contains any type parameters (typeParameterType).
 *
 * Used to determine if a type needs substitution.
 * For example:
 * - `int` -> false (no type parameters)
 * - `T` -> true (is a type parameter)
 * - `List<T>` -> true (contains type parameter)
 * - `List<int>` -> false (fully instantiated)
 */
export declare const containsTypeParameter: (type: IrType) => boolean;
/**
 * Type substitution map: type parameter name -> concrete IrType
 */
export type TypeSubstitutionMap = ReadonlyMap<string, IrType>;
/**
 * Result of substitution building - either success with map, or conflict error.
 * Conflicts occur when the same type parameter binds to different types.
 */
export type SubstitutionResult = {
    readonly ok: true;
    readonly map: TypeSubstitutionMap;
} | {
    readonly ok: false;
    readonly conflict: {
        readonly param: string;
        readonly type1: IrType;
        readonly type2: IrType;
    };
};
/**
 * Unify a formal type (with type parameters) against an actual type (instantiated).
 *
 * Returns a substitution map if unification succeeds, undefined if it fails.
 *
 * Examples:
 * - unify(T, int) -> { "T" -> int }
 * - unify(List<T>, List<int>) -> { "T" -> int }
 * - unify(Map<K, V>, Map<string, int>) -> { "K" -> string, "V" -> int }
 * - unify(int, string) -> undefined (no type parameters to match)
 *
 * The unification is one-way: we're matching the formal type's shape against
 * the actual type and extracting bindings for type parameters found in formal.
 */
export declare const unify: (formal: IrType, actual: IrType) => TypeSubstitutionMap | undefined;
export declare const typesEqual: (a: IrType, b: IrType) => boolean;
//# sourceMappingURL=ir-substitution-core.d.ts.map