Prefer ≟ and add equality aliases - #5
Open
isomorphisms wants to merge 4 commits into
Open
Conversation
Recognize ≟, ?=, =?, ?=?, and ¿=? as equality spellings that canonicalize to the existing == operation. Keep single = contextual for named/default arguments, prefer ≟ in user-facing examples, and cover the aliases in regression tests.
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.
Prefer
≟as IR's user-facing equality spelling and accept?=,=?,?=?, and¿=?as aliases, alongside existing=and==.The new spellings canonicalize to the existing
==operation, preserving equality precedence and behavior. Single=remains contextual for named arguments and formal defaults.Lexer invariant: IR intentionally retains its broad user-definable Unicode infix fallback. Reserved glyphs are recognized first by explicit lexer rules; only unreserved glyphs fall through to generic
SPECIALhandling. In particular,≟becomesEQ, notSPECIAL, while an unreserved glyph such as⊗remains usable as an ordinary infix function.code/tests/ir-unicode-lexer.Rexercises that boundary. Every hexadecimal code point in that regression has the rendered glyph on the same line, and the test checks the mapping itself (including0x03c0→π) so those comments cannot silently disagree with whatintToUtf8prints. It then defines and calls a function literally namedπ, checks the four assignment arrows and all requested equality aliases, and defines/evaluates⊗through the generic infix path.Current head
909cb9db888d5c666c3f0bc5cba7ee84d5d14fe0has a successful Ubuntu 24.04 GitHub Actions build: dependencies, configure, full build, and the focused Unicode lexer regression all pass. Both the pull-request and same-head push runs completed successfully.Closes #4.