racket / racket/option-contract
`option/c` works inconsistently in DrRacket
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 3
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
running this file:
#lang racket
(module thing racket
(require racket/contract/option)
(provide (contract-out [nothing proc/c] [something proc/c] [something* proc/c]))
(define (my-list args) (list args))
(define proc/c (option/c (-> any/c any/c) #:with-contract #t))
(define something (λ (x) (my-list x)))
(define something* (λ (x) (list x)))
(define nothing (λ (x) '())))
(require rackunit 'thing)
(map value-contract `(,nothing ,something ,something*))
(check-equal? (value-contract something) (value-contract nothing))
(check-equal? (value-contract something) (value-contract something*))
in the command line produces the following (expected) output:
'(#<option> #<option> #<option>)
However running it in DrRacket (with dynamic properties set to 'Debugging', the default) produces the following:
I genuinely don't know whether to file this issue with racket, DrRacket, or option contracts. I'm happy to refile it elsewhere if needed.
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 running the provided Racket reproduction in the command line and then in DrRacket with dynamic properties set to 'Debugging'. Compare the displayed results and trace whether the inconsistency belongs to option contracts or DrRacket; done means the example behaves consistently with the expected output.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100