pub enum HaskellType {
Show 17 variants
Int,
Integer,
Double,
Float,
Bool,
Char,
HsString,
Unit,
IO(Box<HaskellType>),
List(Box<HaskellType>),
Maybe(Box<HaskellType>),
Either(Box<HaskellType>, Box<HaskellType>),
Tuple(Vec<HaskellType>),
Fun(Box<HaskellType>, Box<HaskellType>),
Custom(String),
Polymorphic(String),
Constraint(String, Vec<HaskellType>),
}Expand description
Haskell type representation for type-directed code generation.
Variants§
Int
Int — fixed-precision signed integer (at least 30-bit)
Integer
Integer — arbitrary-precision integer
Double
Double — 64-bit IEEE floating-point
Float
Float — 32-bit IEEE floating-point
Bool
Bool — boolean
Char
Char — Unicode character
HsString
String — alias for [Char]
Unit
() — unit type
IO(Box<HaskellType>)
IO a — IO monad
List(Box<HaskellType>)
[a] — list of a
Maybe(Box<HaskellType>)
Maybe a — optional value
Either(Box<HaskellType>, Box<HaskellType>)
Either a b — sum type
Tuple(Vec<HaskellType>)
(a, b, ...) — tuple
Fun(Box<HaskellType>, Box<HaskellType>)
a -> b — function type
Custom(String)
Named type (data, newtype, type synonym)
Polymorphic(String)
Polymorphic type variable: a, b, f
Constraint(String, Vec<HaskellType>)
Type class constraint: Eq a, Functor f
Trait Implementations§
Source§impl Clone for HaskellType
impl Clone for HaskellType
Source§fn clone(&self) -> HaskellType
fn clone(&self) -> HaskellType
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 HaskellType
impl Debug for HaskellType
Source§impl Display for HaskellType
impl Display for HaskellType
Source§impl Hash for HaskellType
impl Hash for HaskellType
Source§impl PartialEq for HaskellType
impl PartialEq for HaskellType
impl Eq for HaskellType
impl StructuralPartialEq for HaskellType
Auto Trait Implementations§
impl Freeze for HaskellType
impl RefUnwindSafe for HaskellType
impl Send for HaskellType
impl Sync for HaskellType
impl Unpin for HaskellType
impl UnsafeUnpin for HaskellType
impl UnwindSafe for HaskellType
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