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

Stackoverflow when type checking #903

Open
crides opened this issue Jan 12, 2021 · 0 comments
Open

Stackoverflow when type checking #903

crides opened this issue Jan 12, 2021 · 0 comments

Comments

@crides
Copy link

crides commented Jan 12, 2021

I was trying to find the maximum of all the indexed positions in a list of arrays, and I ended up with this (it doesn't type check; the data should be converted to list of streams first):

let { foldl } = import! std.foldable
let { max } = import! std.cmp
let stream @ { Stream, zip_with, ? } = import! std.stream

foldl (\acc x -> zip_with max (stream.of acc) (stream.of x)) [0] [[5], [3]]

This results in a stackoverflow for the type checker instead of giving an error. Since this is incorrect code anyway, there's no rush, but I hope this can help reveal some type checker bugs.

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

No branches or pull requests

2 participants