Struct chalk_solve::goal_builder::GoalBuilder[][src]

pub struct GoalBuilder<'i, I: Interner> { /* fields omitted */ }

Implementations

Returns the database within the goal builder.

Returns the interner within the goal builder.

Creates a goal that ensures all of the goals from the goals iterator are met (e.g., goals[0] && ... && goals[N]).

Creates a goal clauses => goal. The clauses are given as an iterator and the goal is returned via the contained closure.

Given a bound value binders like <P0..Pn> V, creates a goal forall<Q0..Qn> { G } where the goal G is created by invoking a helper function body.

Parameters to body

body will be invoked with:

  • the goal builder self
  • the substitution Q0..Qn
  • the bound value [P0..Pn => Q0..Qn] V instantiated with the substitution
  • the value passthru, appropriately shifted so that any debruijn indices within account for the new binder

Why is body a function and not a closure?

This is to ensure that body doesn’t accidentally reference values from the environment whose debruijn indices do not account for the new binder being created.

Like GoalBuilder::forall, but for a exists<Q0..Qn> { G } goal.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Cast a value to type U using CastTo.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.