pub struct Instance {
pub signature: InstanceSignature,
pub derived: bool,
pub bindings: Vec<Value>,
}Expand description
An instance declaration of the module under check.
A derived instance is one with the bindings its class’s derivation stands for. Past this
point it is read like a written one, bar derived, which says only that
its bindings are generated.
Fields§
§signature: InstanceSignature§derived: boolWhether the body is the word derived. The type checker reads it for one purpose:
an error in a binding generated out of a derivation the class’s module rejected is
that derivation’s error, reported where it was written.
bindings: Vec<Value>One binding per member, each canonicalized as an ordinary value. For a written
instance they are in the order written, and a binding that did not canonicalize
is left out and its error reported. For a derived one they are the members of
the class in the order it declares them, each generated out of the class’s
derivation, and every node of one carries the span of the word derived.