Cleaned up atoms

- Atoms now use MFBI to distinguish between thin and owned atoms.
- Introduced TryFromExpr and ToExpr (formerly ToClause) from the old FFI
- Standardized on Bottom being a ProjErr, which means that there will be no RTErr
This commit is contained in:
2024-07-02 00:57:11 +02:00
parent fc8441f080
commit 949b3758fd
25 changed files with 383 additions and 297 deletions

View File

@@ -1,8 +1,3 @@
/// [Hierarchy] implementation key. The two implementors of this trait are
/// [Base] and [Subtype]. These types are assigned to [InHierarchy::Role] to
/// select the implementation of [Hierarchy].
pub trait HierarchyRole {}
/// A type-level boolean suitable to select conditional trait implementations.
/// Implementors are [True] and [False]
pub trait TLBool {}
@@ -13,17 +8,6 @@ impl TLBool for TLTrue {}
pub struct TLFalse;
impl TLBool for TLFalse {}
/// Assign this type to [InHierarchy::Role] and implement [Descendant] to create
/// a subtype. These types can be upcast to their parent type, conditionally
/// downcast from it, and selected for [Descendant::Parent] by other types.
pub struct Subtype;
impl HierarchyRole for Subtype {}
/// Assign this type to [InHierarchy::Role] to create a base type. These types
/// are upcast only to themselves, but they can be selected in
/// [Descendant::Parent].
pub struct Base;
impl HierarchyRole for Base {}
/// A type that implements [Hierarchy]. Used to select implementations of traits
/// on the hierarchy
pub trait InHierarchy: Clone {