pub struct HaskellDataDecl {
pub name: String,
pub type_params: Vec<String>,
pub constructors: Vec<(String, Vec<HaskellType>)>,
pub deriving_clauses: Vec<String>,
}Expand description
A Haskell data declaration.
Example: data Expr = Lit Int | Add Expr Expr deriving (Show, Eq)
Fields§
§name: StringType name: Expr
type_params: Vec<String>Type parameters: a, b, …
constructors: Vec<(String, Vec<HaskellType>)>Constructor list: (constructor_name, field_types)
deriving_clauses: Vec<String>Deriving clauses: Show, Eq, Ord, …
Trait Implementations§
Source§impl Clone for HaskellDataDecl
impl Clone for HaskellDataDecl
Source§fn clone(&self) -> HaskellDataDecl
fn clone(&self) -> HaskellDataDecl
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 HaskellDataDecl
impl Debug for HaskellDataDecl
Source§impl Display for HaskellDataDecl
impl Display for HaskellDataDecl
Source§impl PartialEq for HaskellDataDecl
impl PartialEq for HaskellDataDecl
impl StructuralPartialEq for HaskellDataDecl
Auto Trait Implementations§
impl Freeze for HaskellDataDecl
impl RefUnwindSafe for HaskellDataDecl
impl Send for HaskellDataDecl
impl Sync for HaskellDataDecl
impl Unpin for HaskellDataDecl
impl UnsafeUnpin for HaskellDataDecl
impl UnwindSafe for HaskellDataDecl
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