import type { EvaluatorContext } from "./evaluator/context";
import type { Token } from "./token";
import type { SomeType, TraitType, Type, TypeApplicationType } from "./types/definitions";
import { type Value } from "./value";
export interface Variable {
    id: string;
    name: string;
    type: Type;
    value?: [Value];
    isCompileTimeOnly: boolean;
    isOwningTheRcValue: boolean;
    isOwningTheSameRcValueAs?: Variable;
    isReassignable?: boolean;
    isRef?: boolean;
    isParameter?: boolean;
    initializedAtToken: Token | undefined;
    consumedAtToken: Token | undefined;
    frameLevel: number;
    token: Token;
    isCreatedFromDestructuringAtomVariable?: boolean;
    parameterAlias?: string;
    isFromEffectSpread?: boolean;
    isEffectParam?: boolean;
    isModuleLevel?: boolean;
    docComment?: string;
}
export type WhereClauseConstraints = {
    someType: SomeType;
    requiredTraits: TraitType[];
    negativeTraits: TraitType[];
};
export type Frame = {
    variables: Variable[];
    id: string;
    isBeginBlockFrame: boolean;
    whereClauseConstraints: Map<string, WhereClauseConstraints>;
};
export type Environment = {
    functionDeclarationFrameLevel: number;
    frames: Frame[];
    modulePath: string;
    inputString: string;
};
export declare function createNewEnv({ modulePath, inputString, }: {
    modulePath: string;
    inputString: string;
}): Environment;
export declare function createEmptyEnv(): Environment;
export declare function cloneEnvForCTFECheck(env: Environment): Environment;
export declare function addWhereClauseConstraintToEnv({ env, someType, traitType, isNegated, }: {
    env: Environment;
    someType: SomeType;
    traitType: TraitType;
    isNegated: boolean;
}): Environment;
export declare function getWhereClauseConstraintsForSomeType(env: Environment, someType: SomeType): {
    requiredTraits: TraitType[];
    negativeTraits: TraitType[];
} | undefined;
export declare function addWhereClauseConstraintForTypeApplication({ env, typeApp, traitType, isNegated, }: {
    env: Environment;
    typeApp: TypeApplicationType;
    traitType: TraitType;
    isNegated: boolean;
}): Environment;
export declare function getWhereClauseConstraintsForTypeApplication(env: Environment, typeApp: TypeApplicationType): {
    requiredTraits: TraitType[];
    negativeTraits: TraitType[];
} | undefined;
export declare function setEnvContainingPrelude(env: Environment): void;
export declare function clearEnvContainingPrelude(): void;
export declare function createEnvContainingPrelude(): Environment;
export declare const YoSelf = "__yo_self";
export declare function addVariableToEnv({ env, variable, deltaFrame, variableId, addToBeginBlockFrame, allowVariableShadowing, }: {
    env: Environment;
    variable: Omit<Variable, "id" | "frameLevel">;
    deltaFrame?: number;
    variableId?: string;
    addToBeginBlockFrame?: boolean;
    allowVariableShadowing?: boolean;
}): {
    env: Environment;
    variable: Variable;
};
export declare function addVariableToFrame({ frame, variable, }: {
    frame: Frame;
    variable: Variable;
}): Frame;
export declare function _printFrameIndexStats(): void;
export declare function getVariablesFromFrame(frame: Frame, variableName: string, variableFilter?: (variable: Variable) => boolean): Variable[];
export declare function getVariablesFromEnv(env: Environment, variableName: string, variableFilter?: (variable: Variable) => boolean): Variable[];
export declare function findVariableFrameLevel(env: Environment, variableName: string): number | undefined;
export declare function getVariablesFromEnvByFilter(env: Environment, variableFilter: (variable: Variable) => boolean): Variable[];
export declare function findInnermostFrameWithGivenVariable(env: Environment, variableFilter: (variable: Variable) => boolean): number;
export declare function pushEnvFrame(env: Environment, frame?: Frame, isBeginBlockFrame?: boolean): Environment;
export declare function popEnvFrame(env: Environment, ignoreCheck?: boolean): Environment;
export declare function updateExistingVariable(env: Environment, oldVariable: Variable, newVariable: Variable): Environment;
export declare function printEnvVarNames(env: Environment): void;
export declare function printEnvFrame(frame: Frame): void;
export declare function getVariableInfo(variable: Variable): {
    id: string;
    name: string;
    type: string;
    typeId: string;
    value: string;
    isCompileTimeOnly: boolean;
    isUndefined: boolean;
    isOwningTheRcValue: boolean;
    isOwningTheSameRcValueAs: string | undefined;
    isReassignable: boolean;
    isConsumed: boolean;
};
export declare function getTypeTraitMethodsByNameFromEnv({ env, context, methodName, type, }: {
    env: Environment;
    context: EvaluatorContext;
    methodName: string;
    type: Type;
}): {
    type: Type;
    value: Value | undefined;
}[];
export declare function getReceiverMethodsByNameFromEnv({ env, context, methodName, receiverType, isInfixOperatorCall, }: {
    env: Environment;
    context: EvaluatorContext;
    methodName: string;
    receiverType: Type;
    isInfixOperatorCall?: boolean;
}): {
    type: Type;
    value: Value | undefined;
    needsPointerConversion?: boolean;
}[];
export declare function keepTopLevelFrameAndComptimeVariablesFromEnv(env: Environment): Environment;
export declare function getVariablesNeedingDrop(env: Environment): Variable[];
export declare function findNearestBeginBlockFrameLevel(env: Environment): number;
export declare function variableExistsInEnvTopFrame(env: Environment, variableName: string): boolean;
