pub enum InstanceTm {
Generator(String),
App {
mor: Mor,
arg: Box<InstanceTm>,
},
List {
modality: Modality,
terms: Vec<Option<InstanceTm>>,
},
ObApp {
op: ObOp,
tm: Box<InstanceTm>,
},
}Expand description
A term in the language of an instance of a model.
Terms are given at the syntax level: applications may nest freely, as in
add(sub([x, y]), z). Elaboration normalizes a term to a single morphism
action applied once to a base of generators.
Variants§
Generator(String)
Reference to a generator by qualified name.
Generators of imported instances are referenced by paths through the
import, e.g. "<import id>.<generator id>".
App
The action of a morphism of the codomain model on an argument term.
Fields
arg: Box<InstanceTm>The argument, lying over the morphism’s domain.
List
List of terms, each possibly ill-defined, in a list modality.
Lies over a list object of the codomain model.
ObApp
Application of an object operation to a term.
Lies over the operation applied to the fiber of the argument, e.g. a term over a tensor product of objects.
Trait Implementations§
Source§impl Clone for InstanceTm
impl Clone for InstanceTm
Source§fn clone(&self) -> InstanceTm
fn clone(&self) -> InstanceTm
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstanceTm
impl Debug for InstanceTm
Source§impl<'de> Deserialize<'de> for InstanceTm
impl<'de> Deserialize<'de> for InstanceTm
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<InstanceTm> for JsValuewhere
InstanceTm: Serialize,
impl From<InstanceTm> for JsValuewhere
InstanceTm: Serialize,
Source§fn from(value: InstanceTm) -> Self
fn from(value: InstanceTm) -> Self
Source§impl FromWasmAbi for InstanceTmwhere
Self: DeserializeOwned,
impl FromWasmAbi for InstanceTmwhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for &InstanceTmwhere
InstanceTm: Serialize,
impl IntoWasmAbi for &InstanceTmwhere
InstanceTm: Serialize,
Source§impl IntoWasmAbi for InstanceTmwhere
InstanceTm: Serialize,
impl IntoWasmAbi for InstanceTmwhere
InstanceTm: Serialize,
Source§impl OptionFromWasmAbi for InstanceTmwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for InstanceTmwhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for InstanceTmwhere
InstanceTm: Serialize,
impl OptionIntoWasmAbi for InstanceTmwhere
InstanceTm: Serialize,
Source§impl PartialEq for InstanceTm
impl PartialEq for InstanceTm
Source§impl RefFromWasmAbi for InstanceTmwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for InstanceTmwhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
Self are recovered from.Source§type Anchor = SelfOwner<InstanceTm>
type Anchor = SelfOwner<InstanceTm>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for InstanceTm
impl Serialize for InstanceTm
Source§impl Tsify for InstanceTm
impl Tsify for InstanceTm
const DECL: &'static str = "/**\n * A term in the language of an instance of a model.\n *\n * Terms are given at the syntax level: applications may nest freely, as in\n * `add(sub([x, y]), z)`. Elaboration normalizes a term to a single morphism\n * action applied once to a base of generators.\n */\nexport type InstanceTm = { tag: \"Generator\"; content: string } | { tag: \"App\"; content: { mor: Mor; arg: InstanceTm } } | { tag: \"List\"; content: { modality: Modality; terms: (InstanceTm | null)[] } } | { tag: \"ObApp\"; content: { op: ObOp; tm: InstanceTm } };"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorFromWasmAbi for InstanceTmwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for InstanceTmwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for InstanceTmwhere
InstanceTm: Serialize,
impl VectorIntoWasmAbi for InstanceTmwhere
InstanceTm: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribeVector for InstanceTm
impl WasmDescribeVector for InstanceTm
impl Eq for InstanceTm
impl StructuralPartialEq for InstanceTm
Auto Trait Implementations§
impl Freeze for InstanceTm
impl RefUnwindSafe for InstanceTm
impl Send for InstanceTm
impl Sync for InstanceTm
impl Unpin for InstanceTm
impl UnwindSafe for InstanceTm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.