Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The `racket' language does not seem to have a type for this identifier; for stream->list #970

Open
ailrk opened this issue Sep 8, 2020 · 4 comments
Labels

Comments

@ailrk
Copy link

ailrk commented Sep 8, 2020

What version of Racket are you using?

Racket v7.7

What program did you run?

(stream->list (in-range 0 3))

What should have happened?

return '(0 1 2)

If you got an error message, please include it here.

> (stream->list (in-range 0 3))                                     
; readline-input:14:1: Type Checker: missing type for identifier;
; The `racket' language does not seem to have a type for this identifier;
;   please file a bug report identifier: stream->list
;   from module: (lib typed/racket)
;   in: stream->list
@jackfirth
Copy link
Contributor

In the meantime, you can use sequence->list.

@jackfirth jackfirth added the bug label Sep 10, 2020
@Lazerbeak12345
Copy link
Contributor

This stopgap won't work for a usecase I have in mind, since (stream? empty-sequence) returns #f and I'm typing something that relies on racket/stream. Just a note.

This was referenced Jan 26, 2023
@AlexKnauth
Copy link
Member

Why wouldn't sequence->list work? All streams are sequences, right? So (stream? empty-sequence) shouldn't be necessary. (sequence? empty-stream) would be necessary instead, and that's fine because it's true.

@Lazerbeak12345
Copy link
Contributor

(we actually talked through this on discord. I'm just writing this here so others aren't confused)

The problem was defining a type for a function that takes a stream as an argument. Using the Sequenceof type should be sufficient as a workaround in the short-term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants