Metakit / API

@doeixd/metakit/syntax

MetaKit DSL authoring toolkit (@doeixd/metakit/syntax).

Small, orthogonal combinators over the existing MetaKit kernel:

  • dual — data-first / data-last overloads from an Operation with an explicit receiver position (self: 0 | 1), preserving operand order, environment intersection, and null propagation.
  • dualLanguage — derives a dual/pipeable namespace for every operation in a Language without mutating Expr prototypes.
  • testLanguage — shared conformance harness running reference JS, @doeixd/metakit/artifact round-trip, fingerprinting, and Language.readiness checks (distinguishing bounded tested results from formal proofs).

Functions

dualDerive a data-first / data-last callable from an Operation with an explicit receiver position (self: 0 or self: 1). Never silently swaps operands of…
dualLanguageDerive a dual/pipeable namespace (self: 0) for every operation in language. Rejects reserved JS property names (then, pipe, constructor, …) loudly.
testCaseConstruct a type-checked test case for testLanguage, preserving exact env and result inference.
testLanguageShared conformance harness for any MetaKit Language: for every test case, checks Artifact.encodeExpr/decodeExpr round-trip, deterministic…

Interfaces

AnyLanguageTestCaseType-erased test case accepted by testLanguage after testCase(...) checks its types.
DualBinary0Dual callable for a binary Operation with self at index 0: op(a, b) or pipe(a, op(b)).
DualBinary1Dual callable for a binary Operation with self at index 1: op(a, b) or pipe(b, op(a)).
DualTernary0Dual callable for a ternary Operation with self at index 0: op(a, b, c) or pipe(a, op(b, c)).
LanguageCaseReport
LanguageTestCase
LanguageTestReport

Types