feat: Haec — trope-particularity language front-end (grammar, elaboration, examples)#1
Merged
Merged
Conversation
design/grammar.ebnf (term formers, fix, 5 atomic effects + sugar); design/ elaboration.adoc (each construct → Trope IR edge + grade + its O2 lowering obligation); vendored design/trope-ir.schema.json (the IR contract Haec targets).
…ecker examples/*.haec with their *.ir.json; faithful record → p-sufficient, survey collapse → p-insufficient (witness=collapse), labelled fuse → p-sufficient. Each round-trips through trope-checker; tests/check-examples.py validates standalone.
Haec as one IR-producing front-end (not the checker, not the vocabulary); honest design-pass snapshot; compiler/ and lsp/ scaffolded as named future work.
De-template; identity; root-allow (design/, compiler/, lsp/, LICENSES/); LICENSES (MPL-2.0 + CC-BY-SA-4.0); Justfile import of build/just/trope.just (check).
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
hyperpolymath
marked this pull request as ready for review
June 22, 2026 08:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Haec — a trope-particularity language front-end (design pass)
Builds Haec into this repo per the build brief: the first front-end that lowers
programs to the Trope IR consumed by
trope-checker. Design pass — no compiler yet(HC-5: pin meaning before implementation).
What's here
design/grammar.ebnf— small surface: term formers,fix, the five atomiceffects (
attenuate/predicate/drop/sever/fuse) + sugar(
preserve/project/collapse/detach). The deceptive trio is unwritable (HC-3).design/elaboration.adoc— each construct → a Trope IR edge + grade, and itslowering-correctness obligation (calculus O2) as Haec's burden (stated, not
asserted-discharged).
examples/—*.haecprograms paired with the*.ir.jsonthey lower to:faithful record →
p-sufficient; survey collapse →p-insufficient(witness = thecollapse edge); labelled aggregate fuse →
p-sufficient. Each round-trips throughthe real trope-checker (schema-valid + expected verdict).
just checkvalidatesstandalone against the vendored IR schema.
compiler/andlsp/scaffolded withSTATUS.adocas named future work; docs(README/EXPLAINME/AUDIT/AFFIRMATION/ADR-0002) + a
trope-checkCI job.Verified
just check→ 3/3 examples lower to valid Trope IR. Round-trip verdicts confirmedagainst
trope-checker(just haec-roundtrip).Boundaries
Haec is one IR producer among many; it defines neither the checker (HC-1) nor the
vocabulary. Lowering correctness is Haec's obligation, per construct (deferred,
named). Code = MPL-2.0, prose docs = CC-BY-SA-4.0. Inherited estate CI may be red on
infra unrelated to this change; the
trope-checkjob is the relevant signal.Draft for review — not for merge yet. Depends conceptually on
hyperpolymath/trope-checker#1(the IR + checker).