Crate roussillon_type_system
source ·Expand description
§Roussillon : Type System
This crate provides some structs and traits to manage types and typed values.
This crate goal IS NOT to manage memory allocation.
§Primitive types
These are the necessary types to construct any other meaningful type. Usually, these are “machine types” :
- types::primitive::Primitive::Boolean type of value::boolean::Boolean,
- types::primitive::Primitive::Byte type of value::byte::Bytes::Byte,
- types::primitive::Primitive::Bytes type of :
- types::primitive::Primitive::Float type of value::number::Float,
- types::primitive::Primitive::Integer type of value::number::Integer,
- types::primitive::Primitive::Reference type of value::reference::Reference,
- types::primitive::Primitive::List type of value::list::List,
§The “tuple” type
A sequence of heterogeneous typed values.
§Algebraic Data Types
- types::algebraic::SumType type of value::union::SumValue,
- types::algebraic::ProductType type of value::record::ProductValue,
§Custom types
These types are identity::Identified ADTs with identity::Labelled fields.
- types::typedef::Enumeration type of value::union::Union,
- types::typedef::Structure type of value::record::Record,
§Functional
- types::functional::FunctionType type of types::functional::FunctionDeclaration composed in value::function::FunctionDefinition with value::function::FunctionBody.
§Experimental types
These types are experimental and should not be used yet.
- [types::dynamic::AnyType], [types::dynamic::Dynamic] and [value::value_type::ValueType],
- [types::interface::Interface], [types::interface::Method], [types::interface::Trait] and [types::interface::Constructor],
- [effect::Effect].
Modules§
- A namespaced Identifier for named types like crate::types::typedef::Enumeration and crate::types::typedef::Structure.
- This module provides a types feature.
- All values corresponding types in the module crate::types.