@hackage / moonlight-core

Mathematical basis for Pale Meridian.

Latest0.1.0.0

Changelog

Changelog

0.1.0.0 - 2026-07-12

  • Initial release of the Level-0 foundation: the numeric tower (Scalar, Numeric) and its scalar type classes (AdditiveGroup, MultiplicativeMonoid, Ring, Field, Metric, ordered and continuous fields), with instances for the primitive numeric types.
  • Approximate equality with absolute, relative, and ULP tolerance kinds (ApproxEq).
  • Canonical and exact numeric representations (CanonicalNumber, Canon, ExactToken), including one self-delimiting structural sequence grammar.
  • Order and reachability: partial-order classes (Order), finite universes (Finite), bounded fixpoint combinators (Fixpoint), and persistent union-find (UnionFind) with checked persistent and transactional class-id allocation.
  • Identity and lookup: stable structural hashing (StableHash, Hash), checked total registries (TotalRegistry), and the relational term database (Term.Database).
  • Syntax layer: Moonlight-owned authored patterns (PatternVar, PatternNode), Language/ZipMatch, typed substitutions, structural theories whose canonicalization reads node children through Foldable, and Fix.Order.
  • Pure proof-manifest rendering/parsing for the EGraph emitter and Rewrite-owned external proof boundary; package-local law tests do not impersonate that integration.
  • Moonlight.Core is the aggregate public surface. Public named sublibraries provide syntax, pattern automata, and the host-neutral e-graph program algebra; Moonlight.Core.Unsound provides the explicit trust boundary.