Trait chalk_engine::context::InferenceContext
[−]
[src]
pub trait InferenceContext<C: Context>: Sized + Debug { type Environment: Environment<C, Self>; type Goal: Goal<C, Self>; type DomainGoal: DomainGoal<C, Self>; type GoalInEnvironment: GoalInEnvironment<C, Self>; type RegionConstraint: Debug; type Substitution: Debug; type BindersGoal: Debug; type Parameter: Debug; type ProgramClause: Debug; type UnificationResult: UnificationResult<C, Self>; }
The set of types belonging to an "inference context"; in rustc, these types are tied to the lifetime of the arena within which an inference context operates.
Associated Types
type Environment: Environment<C, Self>
Represents a set of hypotheses that are assumed to be true.
type Goal: Goal<C, Self>
Goals correspond to things we can prove.
type DomainGoal: DomainGoal<C, Self>
A goal that can be targeted by a program clause. The SLG
solver treats these opaquely; in contrast, it understands
"meta" goals like G1 && G2
and so forth natively.
type GoalInEnvironment: GoalInEnvironment<C, Self>
Represents a goal along with an environment.
type RegionConstraint: Debug
Represents a region constraint that will be propagated back (but not verified).
type Substitution: Debug
Represents a substitution from the "canonical variables" found in a canonical goal to specific values.
type BindersGoal: Debug
A "higher-order" goal, quantified over some types and/or
lifetimes. When you have a quantification, like forall<T> { G }
or exists<T> { G }
, this represents the <T> { G }
part.
(In Lambda Prolog, this would be a "lambda predicate", like T \ Goal
).
type Parameter: Debug
A term that can be quantified over and unified -- in current Chalk, either a type or lifetime.
type ProgramClause: Debug
A rule like DomainGoal :- Goal
.
resolvent_clause
combines a program-clause and a concrete
goal we are trying to solve to produce an ex-clause.
type UnificationResult: UnificationResult<C, Self>
The successful result from unification: contains new subgoals and things that can be attached to an ex-clause.