Module typeck

Module typeck 

Source
Expand description

§Plurality Type Checking

Type system extensions for plurality constructs. Extends Sigil’s evidentiality type system to track alter-source information.

§Core Type Extensions

Sigil’s evidentiality markers (!, ~, ?, ) are extended with alter-source:

MarkerBase MeaningAlter-Source Extension
@!CertainFronting alter’s authoritative view
@~ReportedCo-conscious alter’s shared perception
@?UncertainDormant alter’s cached memory
@‽ParadoxBlended state from multiple alters

§Type Compatibility Rules

  1. T@! (fronting) is always compatible with T
  2. T@~ (co-con) can be assigned to T~ or T?
  3. T@? (dormant) can only be assigned to T?
  4. T@‽ (blended) requires explicit resolution before use

§Alter-Polymorphism

Functions can be polymorphic over fronting alter:

fn perceive<A: Alter>(entity: &Entity) -> Perception@A

Structs§

AlterContext
Context for type checking within alter blocks
PluralType
Extended type information for plurality
PluralityTypeChecker
Plurality type checker

Enums§

AlterSourceCoercion
Coercion type for alter-source
AlterSourceCompatibility
Rules for alter-source type compatibility
PluralityTypeError
Plurality-specific type errors
SwitchValidation
Result of validating a switch

Functions§

check_compatibility
Check compatibility between two plural types