racket/match rejects some quoted literals
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 5.2k
- Forks
- 698
- Avg merge
- 18h 34m
- Merged PRs (30d)
- 5
Description
What version of Racket are you using?
8.2 CS
What program did you run?
#lang racket
(match-lambda
['#s(some-prefab a-symbol)
#t])
What should have happened?
The program should compile and run successfully.
If you got an error message, please include it here.
match: non-literal in quote pattern in: #s(some-prefab a-symbol)
Please include any other relevant details
In contrast, this version (with quasiquote) works as expected:
#lang racket
(match-lambda
[`#s(some-prefab a-symbol)
#t])
Contributor guide
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 reproducing the supplied #lang racket match-lambda example on Racket 8.2 CS, then trace the match handling for quoted prefab literals and compare it with the working quasiquote form. Done means the quoted #s(some-prefab a-symbol) pattern compiles and runs successfully without the non-literal error.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100