Signature definitions without `signature`
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 112
- Forks
- 73
- Avg merge
- 9h 41m
- Merged PRs (30d)
- 1
Description
We can use define to give a signature form (the way in which student
languages support type annotation) a name:
(define WeekDay (signature (enum "Mon" "Tue" "Wed" "Thu" "Fry" "Sat" "Sun")))
Since such definitions correspond to data (type) definitions in HtDP,
it would be convenient to have a variant of define that does not
need an explicit signature. Thus, the above definition could be
written as:
(define-type WeekDay (enum "Mon" "Tue" "Wed" "Thu" "Fry" "Sat" "Sun"))
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 locating the implementation of define and signature in the HtDP language, then inspect nearby tests or examples for data and type definitions. The work is done when the proposed define-type WeekDay form is accepted with the shown enum and behaves like the equivalent named signature definition.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100