pub struct HaskellTypeClass {
pub name: String,
pub type_params: Vec<String>,
pub superclasses: Vec<HaskellType>,
pub methods: Vec<(String, HaskellType, Option<HaskellExpr>)>,
}Expand description
A Haskell class declaration.
Example:
class Functor f where
fmap :: (a -> b) -> f a -> f bFields§
§name: StringClass name: Functor
type_params: Vec<String>Class type parameters: f
superclasses: Vec<HaskellType>Superclass constraints: Eq a, Ord a
methods: Vec<(String, HaskellType, Option<HaskellExpr>)>Methods: (name, signature, optional default body)
Trait Implementations§
Source§impl Clone for HaskellTypeClass
impl Clone for HaskellTypeClass
Source§fn clone(&self) -> HaskellTypeClass
fn clone(&self) -> HaskellTypeClass
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 HaskellTypeClass
impl Debug for HaskellTypeClass
Source§impl Display for HaskellTypeClass
impl Display for HaskellTypeClass
Source§impl PartialEq for HaskellTypeClass
impl PartialEq for HaskellTypeClass
impl StructuralPartialEq for HaskellTypeClass
Auto Trait Implementations§
impl Freeze for HaskellTypeClass
impl RefUnwindSafe for HaskellTypeClass
impl Send for HaskellTypeClass
impl Sync for HaskellTypeClass
impl Unpin for HaskellTypeClass
impl UnsafeUnpin for HaskellTypeClass
impl UnwindSafe for HaskellTypeClass
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