pub struct AgdaClause {
pub patterns: Vec<AgdaPattern>,
pub rhs: Option<AgdaExpr>,
pub where_decls: Vec<AgdaDecl>,
}Expand description
A single function definition clause.
f p1 p2 = rhs (where decls...)
Fields§
§patterns: Vec<AgdaPattern>Argument patterns
rhs: Option<AgdaExpr>Right-hand side (None for absurd clauses)
where_decls: Vec<AgdaDecl>Optional where declarations
Implementations§
Source§impl AgdaClause
impl AgdaClause
Sourcepub fn emit_patterns(&self) -> String
pub fn emit_patterns(&self) -> String
Emit pattern list (space-separated).
Sourcepub fn emit_clause(&self, func_name: &str, indent: usize) -> String
pub fn emit_clause(&self, func_name: &str, indent: usize) -> String
Emit a full clause line: func_name patterns = rhs
Trait Implementations§
Source§impl Clone for AgdaClause
impl Clone for AgdaClause
Source§fn clone(&self) -> AgdaClause
fn clone(&self) -> AgdaClause
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgdaClause
impl Debug for AgdaClause
Source§impl PartialEq for AgdaClause
impl PartialEq for AgdaClause
impl StructuralPartialEq for AgdaClause
Auto Trait Implementations§
impl Freeze for AgdaClause
impl RefUnwindSafe for AgdaClause
impl Send for AgdaClause
impl Sync for AgdaClause
impl Unpin for AgdaClause
impl UnsafeUnpin for AgdaClause
impl UnwindSafe for AgdaClause
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