Skip to content

Allow local prefix names in Idriç source - #55

Draft
isomorphisms wants to merge 8 commits into
Idriçfrom
fix/idric-case-do-layout
Draft

Allow local prefix names in Idriç source#55
isomorphisms wants to merge 8 commits into
Idriçfrom
fix/idric-case-do-layout

Conversation

@isomorphisms

@isomorphisms isomorphisms commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Scope

Repair the Idriç parser behavior exposed by dilapidated-shed/icu#13 without rewriting the downstream client.

Reduction

The reported failure at Right headers ⇒ do was a backtracking symptom, not the defective construct. Unicode arrows, do branch bodies, sibling dedents, nested cases, cases inside let/do, multiline application, and the downstream result-handling shape all parse independently.

The minimal failure is:

local_prefix : Integer → IO Integer
local_prefix value = do
  let prefix = value + 1
  pure prefix

prefix was globally tokenized as a fixity keyword, so it could not be used as a local name in .idric source.

Repair

  • Reclassify prefix as an identifier only at the .idric source boundary.
  • Accept that identifier contextually in a prefix-fixity declaration.
  • Reduce edric005 to the local-name regression.
  • Leave ordinary .idr tokenization unchanged.

Receipts

  • Focused edric005: PASS.
  • Full focused Edriç suite (edric001006, edric009): PASS.
  • .idric prefix-fixity declaration: PASS.
  • Existing .idr import009 prefix-fixity test: PASS.
  • Unchanged dilapidated-shed/icu#13 source: all six package modules compile and the icu executable is produced.
  • ICU OpenAI tests: 7/7 PASS.
  • ICU transport-model equivalence checks: PASS.

Downstream: dilapidated-shed/icu#13

@isomorphisms isomorphisms changed the title Fix Unicode case branches with layout-sensitive do bodies Allow local prefix names in Idriç source Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant