define-term in pattern position
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 112
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
I usually think of any term being allowed in pattern position and simply acting as "unify with this".
I think of define-term as simply introducing a meta-variable that means literally the term being defined.
However, both of these mental models are broken when combined:
(require redex/reduction-semantics)
(define-language L)
(define-term T true)
> (redex-match? L true (term T))
#t
> (redex-match? L T (term true))
#f
> (define-judgment-form L
#:mode (eval I O)
[(eval true true)])
> (judgment-holds (eval T true))
#t
> (judgment-holds (eval T T))
#f
Is there a reason? Could this be supported?
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 with the interaction among define-term, redex-match?, define-judgment-form, and judgment-holds shown in the examples. Determine why the two pattern cases differ and define what supported define-term behavior in pattern position should mean; done requires an agreed behavior for both examples.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100