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

Definitions are allowed to have free variables #12

Open
bmsherman opened this issue Mar 7, 2019 · 1 comment
Open

Definitions are allowed to have free variables #12

bmsherman opened this issue Mar 7, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@bmsherman
Copy link
Member

This shouldn't typecheck

type Random A = integer -> integer * A;;
let runRandom (x : Random A) : A =
  (x i0)[1];;

because the A in runRandom is unbound.

let runRandom A (x : Random A) : A =
  (x i0)[1];;
@bmsherman bmsherman added the bug Something isn't working label Mar 7, 2019
@bmsherman
Copy link
Member Author

This results in typechecking errors further down the line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant