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 Display for Decls
[src]
impl Display for Decls
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Decls
[src]
impl Clone for Decls
fn clone(&self) -> Decls
[src]
fn clone(&self) -> Decls
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Decls
[src]
impl Debug for Decls
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for Decls
[src]
impl Eq for Decls
impl PartialEq for Decls
[src]
impl PartialEq for Decls
fn eq(&self, other: &Decls) -> bool
[src]
fn eq(&self, other: &Decls) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Decls) -> bool
[src]
fn ne(&self, other: &Decls) -> bool
This method tests for !=
.
impl Hash for Decls
[src]
impl Hash for Decls