pub struct HaskellEquation {
pub patterns: Vec<HaskellPattern>,
pub guards: Vec<HaskellGuard>,
pub body: Option<HaskellExpr>,
pub where_clause: Vec<HaskellFunction>,
}Expand description
A single equation of a Haskell function definition.
Example: factorial 0 = 1
Fields§
§patterns: Vec<HaskellPattern>Argument patterns for this equation
guards: Vec<HaskellGuard>Optional guards; if empty, body is unconditional
body: Option<HaskellExpr>Right-hand side (if no guards)
where_clause: Vec<HaskellFunction>Where clause local bindings
Trait Implementations§
Source§impl Clone for HaskellEquation
impl Clone for HaskellEquation
Source§fn clone(&self) -> HaskellEquation
fn clone(&self) -> HaskellEquation
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 HaskellEquation
impl Debug for HaskellEquation
Source§impl PartialEq for HaskellEquation
impl PartialEq for HaskellEquation
impl StructuralPartialEq for HaskellEquation
Auto Trait Implementations§
impl Freeze for HaskellEquation
impl RefUnwindSafe for HaskellEquation
impl Send for HaskellEquation
impl Sync for HaskellEquation
impl Unpin for HaskellEquation
impl UnsafeUnpin for HaskellEquation
impl UnwindSafe for HaskellEquation
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