Language Reference Abridged Core Edition

Myceta Language Reference

Myceta's source language is statically typed, expression-oriented, and graph-native. Named node declarations and their dependencies define a deterministic execution DAG with tracked provenance and explicit outcome states.

1. Naming & Lexical Conventions

ConstructConventionExamples
Builtin value & container typeslowercasei64, f64, bool, text, array<T>, vector<T>, matrix<T>, optional<T>
User types, traits & union casesPascalCaseLinearMaterial, Semigroup, Ok, Err
Modules & physical dimensionsPascalCaseMyceta.Core.Ops, Myceta.Numerics.Linear, Length, Time
Functions, methods & record fieldscamelCasesolveLu, elasticModulus, isOk
Graph nodes & scenariosPascalCaseOrigin, Deflection, HeavyWinter
Compiler directiveslowercase.dottedtrait.hkt, units.strict, numeric.lossy_cast_policy

2. Auto-Imported Prelude

Every .myc module implicitly brings the core prelude traits and types into scope without boilerplate imports:

3. Traits, Derivation & Higher-Kinded Composition

trait Describable {
    fn summary(self: Self) -> text
}

type SectionProfile = { designation: text; depthMm: f64 } derive(Eq, Clone, Debug)

impl Describable for SectionProfile {
    fn summary(self: Self) -> text = self.designation
}

Standard algebraic hierarchies live in Myceta.Core.Algebra (Semigroup → Monoid → Group; Semiring → Ring → Field), and opt-in higher-kinded traits (directives { trait.hkt = on }) live in Myceta.Core.Effects (Functor → Applicative → Monad, Foldable, Traversable).