daemonic_error 1.0.0

Errors that compose, predict, and leave receipts - Compose: algebraic combination (in active development) - Predict: Glass/Severity - Receipts: audit trail, position, checksum - Reflection: Runtime Reflection through TopologySegment (in active development)
use crate::daemonic::{Anchor, AnchorDomainSet, TopologySegment};

/// Fixes meaning within a context.
/// DB mapping: D11 (Entropy Delta) + D14 (Domain)
///
/// Parent trait for all meaning-carrying anchors.
/// Meaning cannot exist without context, so SymbolicAnchors
/// always reference the context they're meaningful within.
pub trait SymbolicAnchor: Anchor {
	type Anchor: ReferenceFrame = TopologySegment;
	/// What context is this symbol meaningful within?
	fn meaningful_within(&self) -> Self::Anchor;

	/// How novel is this symbol relative to its context?
	/// 1.0 = completely novel. 0.0 = redundant (entropy terminated).
	/// DB: maps directly to D11.
	fn novelty(&self) -> f64 { 0.5 }
}
const PARENTHESIS_ENCLOSURE_TOP: TopologySegment = TopologySegment::new("Daemonic::Anchor::SymbolicAnchor::()");
impl SymbolicAnchor for () {
	fn meaningful_within(&self) -> TopologySegment {
		PARENTHESIS_ENCLOSURE_TOP
	}
}
impl Anchor for () {
	fn anchor_domains(&self) -> AnchorDomainSet {
		AnchorDomainSet::NONE
	}
}
impl SemanticAnchor for () {}
pub use semantic::*;
mod semantic;
pub use syntactic::*;
pub(crate) mod syntactic;
pub use narrative::*;
mod narrative;
pub use visual::*;
// use crate::daemonic::daemonic_core::frame::ReferenceFrame;
use crate::daemonic::frame::ReferenceFrame;

mod visual;