pub enum DeclKind {
Val(Pat, Expr),
ValRec(Symbol, Expr),
Fun(Vec<FunBinding>),
Datatype(DatatypeDecl),
TypeAlias(TypeAliasDecl),
Local(Vec<Decl>, Vec<Decl>),
Use(String),
Effect(Symbol, Option<TypeExpr>),
}Variants§
Val(Pat, Expr)
val p = e
ValRec(Symbol, Expr)
val rec f = fn x => e
Fun(Vec<FunBinding>)
fun f x1 x2 ... = e (simple, possibly mutual via and)
Datatype(DatatypeDecl)
datatype ('a, 'b) T = C1 of t | C2 | ...
TypeAlias(TypeAliasDecl)
type ('a, 'b) T = t
Local(Vec<Decl>, Vec<Decl>)
local d1 in d2 end
Use(String)
use "path/to/file.hml"
Effect(Symbol, Option<TypeExpr>)
effect Yield of Int
Trait Implementations§
impl StructuralPartialEq for DeclKind
Auto Trait Implementations§
impl Freeze for DeclKind
impl RefUnwindSafe for DeclKind
impl Send for DeclKind
impl Sync for DeclKind
impl Unpin for DeclKind
impl UnsafeUnpin for DeclKind
impl UnwindSafe for DeclKind
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
Mutably borrows from an owned value. Read more