require arrows, sub-range-binders, and add-definition-target
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 516
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
This is for discussion, not yet a specific proposal.
Status quo
; define.rkt
(struct s (a))
s-a
(provide (struct-out s))
s-a is treated as two "sub-range binders", s and a. There are two lexical arrows (require-arrow = #f) between s and a. This is nice.
; require.rkt
(require "define.rkt")
s-a
s-a is treated as a single identifier. There's one require arrow (require-arrow = #t) between s-a and "the-above.rkt". This seems less nice.
Instead?
Should there instead be two require arrows in require.rkt?
Should add-definition-target be called for s-a with the srcloc for the a within the struct form, for define.rkt? (It might be already, I haven't yet checked.)
Should add-jump-to-definition be called for the a in s-a in require.rkt? (It might be already, I haven't yet checked.)
In other words, the sub-range binders idea would apply to imported as well as local definitions.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the define.rkt and require.rkt examples, then trace the existing require-arrow handling and the add-definition-target and add-jump-to-definition entry points. Determine the current behavior for imported sub-range binders and document an agreed proposal for how arrows, definition targets, and jumps should work before implementing anything.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100