pub enum AgdaDecl {
FuncType {
name: String,
ty: AgdaExpr,
},
FuncDef {
name: String,
clauses: Vec<AgdaClause>,
},
DataDecl(AgdaData),
RecordDecl(AgdaRecord),
ModuleDecl {
name: String,
params: Vec<(String, AgdaExpr)>,
body: Vec<AgdaDecl>,
},
Import(String),
Open(String),
Variable(Vec<(String, AgdaExpr)>),
Postulate(Vec<(String, AgdaExpr)>),
Pragma(String),
Comment(String),
Raw(String),
}Expand description
Top-level Agda 2 declaration.
Variants§
FuncType
Type signature: f : T
FuncDef
Function definition: one or more clauses
DataDecl(AgdaData)
Data declaration
RecordDecl(AgdaRecord)
Record declaration
ModuleDecl
Module declaration: module M where ...
Import(String)
import Data.Nat
Open(String)
open Data.Nat (or open Data.Nat using (...))
Variable(Vec<(String, AgdaExpr)>)
variable {A B : Set}
Postulate(Vec<(String, AgdaExpr)>)
postulate name : T
Pragma(String)
{-# BUILTIN ... #-} pragma
Comment(String)
Plain comment: -- text
Raw(String)
Raw verbatim Agda text (fallback)
Implementations§
Trait Implementations§
impl StructuralPartialEq for AgdaDecl
Auto Trait Implementations§
impl Freeze for AgdaDecl
impl RefUnwindSafe for AgdaDecl
impl Send for AgdaDecl
impl Sync for AgdaDecl
impl Unpin for AgdaDecl
impl UnsafeUnpin for AgdaDecl
impl UnwindSafe for AgdaDecl
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