import { type Environment } from "../../env";
import { type Expr, type FnCallExpr } from "../../expr";
import type { FunctionType, SomeType, TraitField, TraitType, Type } from "../../types/definitions";
import { type TraitValue, type UnknownValue, type Value } from "../../value";
import type { EvaluatorContext } from "../context";
interface NegativeGenericImpl {
    forallParameters: ForallParameter[];
    whereConstraints: {
        someType: SomeType;
        traitType: TraitType;
        traitExpr?: Expr;
    }[];
    receiverTypePattern: Type;
    traitType: TraitType;
    sourceModulePath?: string;
}
export declare function hasNegativeImpl(typeId: string, traitTypeId: string): boolean;
export declare function findMatchingNegativeGenericImpl(concreteType: Type, traitType: TraitType, env: Environment): NegativeGenericImpl | undefined;
export type ForallParameter = {
    kind: "type";
    name: string;
    someType: SomeType;
} | {
    kind: "value";
    name: string;
    type: Type;
    unknownValue: UnknownValue;
};
export interface GenericImpl {
    forallParameters: ForallParameter[];
    whereConstraints: {
        someType: SomeType;
        traitType: TraitType;
        traitExpr?: Expr;
    }[];
    receiverTypePattern: Type;
    traitType: TraitType;
    traitValue: TraitValue;
    expr: Expr;
    sourceModulePath?: string;
    definitionEnv: Environment;
    traitTypeArgExprs?: Expr[];
    traitFunctionParamNames?: string[];
}
export declare function isConcreteImplBeingRegistered(receiverTypeId: string, traitTypeId: string): boolean;
export declare function clearGenericImplsFromModule(modulePath: string): void;
export declare function clearAllGlobalImplState(): void;
export declare function findMatchingGenericImpl({ concreteType, traitType, env, }: {
    concreteType: Type;
    traitType: TraitType;
    env: Environment;
}): GenericImpl | undefined;
export declare function findMethodsFromGenericImpls({ concreteType, methodName, env, }: {
    concreteType: Type;
    methodName: string;
    env: Environment;
}): {
    type: FunctionType;
    value: Value | undefined;
}[];
export declare function enumerateMethodNamesFromGenericImpls({ concreteType, env, }: {
    concreteType: Type;
    env: Environment;
}): {
    name: string;
    type: FunctionType;
}[];
export interface GenericImplDocEntry {
    signature: string;
    traitName?: string;
    methodNames: string[];
    methods: {
        name: string;
        type: FunctionType;
    }[];
}
export declare function getGenericImplDocEntries({ concreteType, env, receiverTypeName, }: {
    concreteType: Type;
    env: Environment;
    receiverTypeName?: string;
}): GenericImplDocEntry[];
export declare function findAssociatedTypeFromGenericImpls({ concreteType, propertyName, env, }: {
    concreteType: Type;
    propertyName: string;
    env: Environment;
}): {
    type: Type;
    value: Value;
} | undefined;
export declare function findMethodFromGenericImplForTrait({ concreteType, traitType, methodName, env, }: {
    concreteType: Type;
    traitType: TraitType;
    methodName: string;
    env: Environment;
}): {
    type: FunctionType;
    value: Value | undefined;
} | undefined;
export declare function clearImplsFromModule(modulePath: string): void;
export declare function snapshotAllImplTraitFields(): Map<TraitType, TraitField[]>;
export declare function evaluateImplBlock({ expr, env, context, }: {
    expr: FnCallExpr;
    env: Environment;
    context: EvaluatorContext;
}): FnCallExpr;
export {};
