Can't generate flat contracts for (Syntaxof Any)
Open
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 575
- Forks
- 106
- Avg merge
- 2h 1m
- Merged PRs (30d)
- 2
Description
What version of Racket are you using?
6.4
What program did you run?
Typed module A.rkt:
#lang typed/racket
(provide (struct-out blob))
(struct blob
([stuff : (Syntaxof Any)])
#:transparent)
Untyped module B.rkt:
#lang racket
(require "A.rkt")
(define (get-stuff x)
(blob-stuff x))
What should have happened?
It should have been able to load, based on discussions with @samth about Syntax vs (Syntaxof Any).
If you got an error message, please include it here.
; /home/davidchr/tmp/B.rkt:6:2: Type Checker: could not convert type to a contract;
; required a flat contract but generated a chaperone contract
; identifier: blob-stuff
; type: (-> blob (Syntaxof Any))
; in: (blob-stuff x)
Changing the type of stuff to Any makes it able to use the projection.
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
Reproduce the issue using the typed module in A.rkt and the untyped consumer in B.rkt with Racket 6.4. Investigate flat-contract generation for (Syntaxof Any) and the blob-stuff projection; done means B.rkt loads successfully without requiring the field type to be changed to Any.
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