{{ message }}
Repository navigation
Highlight all names in shared Haskell type signatures - #3394
Open
jnohclee-rgb wants to merge 1 commit into
Open
jnohclee-rgb wants to merge 1 commit into
jnohclee-rgb wants to merge 1 commit into
Conversation
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.

In a shared Haskell type signature such as
head, last :: [a] -> a, only the first name is highlighted as a function. Recognize a complete comma-separated signature at the start of a line so that every identifier receivesName.Function. Preserve symbolic operators asOperatorand leave ordinary tuple, list, record and expression identifiers unchanged.Related to #2506. The rule handles indentation, multiline lists, Unicode identifiers and parenthesized symbolic operators. It intentionally leaves signatures with intervening comments or explicit same-line semicolon layout outside this change.
Validation: 16 focused tests pass (10 fail on the original lexer, six preservation cases already pass). Full
tox -e py: 5,346 passed, 16 skipped.tox -e checkpasses. Existing environments were reused with installation disabled and this worktree explicitly onPYTHONPATH. The literate-Haskell example changes onlygetColandgetBoxfromNametoName.Functionin an existing shared signature. Source, behavior and golden changes received independent review.AI assistance: Codex assisted with implementation, tests and review. No Haskell compiler validation or optional regexlint/version matrix was run.
Dharma — leave the code kinder than we found it.