Enum gluon_base::kind::Kind
[−]
[src]
pub enum Kind { Variable(u32), Type, Row, Function(ArcKind, ArcKind), }
Kind representation
All types in gluon has a kind. Most types encountered are of the Type
kind which
includes things like Int
, String
and Option Int
. There are however other types
which are said to be "higher kinded" and these use the Function
(a -> b) variant.
These types include Option
and (->)
which both have the kind Type -> Type -> Type
as well as Functor
which has the kind Type -> Type -> Type
.
Variants
Variable(u32)
Representation for a kind which is yet to be inferred.
Type
The simplest possible kind. All values in a program have this kind.
Row
Kinds of rows (for polymorphic records).
Function(ArcKind, ArcKind)
Constructor which takes two kinds, taking the first as argument and returning the second.
Methods
impl Kind
[src]
fn variable(v: u32) -> ArcKind
fn typ() -> ArcKind
fn row() -> ArcKind
fn function(l: ArcKind, r: ArcKind) -> ArcKind
Trait Implementations
impl Clone for Kind
[src]
fn clone(&self) -> Kind
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Kind
[src]
impl Eq for Kind
[src]
impl PartialEq for Kind
[src]
fn eq(&self, __arg_0: &Kind) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Kind) -> bool
This method tests for !=
.
impl Hash for Kind
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.