Enum fungi_lang::ast::Decls
[−]
[src]
pub enum Decls { UseAll(UseAllModule, DeclsRec), Doc(String, DeclsRec), NmTm(String, NameTm, DeclsRec), IdxTm(String, IdxTm, DeclsRec), Type(String, Type, DeclsRec), Val(String, Option<Type>, Val, DeclsRec), Fn(String, Type, Exp, DeclsRec), End, NoParse(String), }
Declaration lists of pure terms; the body of each module.
Each declaration is a definition (an alias) for a pure term of
some Type
, Kind
or Sort
.
Declaration lists are pure: There is no form for naming an
unthunked, effectful expression. In particular, there is no let
binding form for sequencing effects among the definitions here.
In particular, the Val
and Fn
forms can each express
recursive, effectful functions as values (thunks), but cannot
express unthunked applications of these terms. Consequently,
declaration lists are "pure" terms, when included within larger
expressions via the UseAll
form, or other future import forms.
Variants
UseAll(UseAllModule, DeclsRec)
Use all of the definitions of another module
Doc(String, DeclsRec)
Documentation string; from rustdoc
NmTm(String, NameTm, DeclsRec)
Define a name term
IdxTm(String, IdxTm, DeclsRec)
Define an index term
Type(String, Type, DeclsRec)
Define a type
Val(String, Option<Type>, Val, DeclsRec)
Define a value
Fn(String, Type, Exp, DeclsRec)
Define a function
End
NoParse(String)
Trait Implementations
impl Clone for Decls
[src]
fn clone(&self) -> Decls
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Decls
[src]
impl Eq for Decls
[src]
impl PartialEq for Decls
[src]
fn eq(&self, __arg_0: &Decls) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Decls) -> bool
[src]
This method tests for !=
.