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

poly: more parsing quirks #41

Open
chsievers opened this issue Jan 21, 2015 · 0 comments
Open

poly: more parsing quirks #41

chsievers opened this issue Jan 21, 2015 · 0 comments
Labels

Comments

@chsievers
Copy link
Contributor

  • The outermost expression can't be a let expression:
Poly> let x=0 in x
"<stdin>" (line 1, column 11):
unexpected reserved word "in"
expecting letter or digit
  • Unlike let declarations, let expressions don't allow function definitions with arguments:
Poly> (let f x = x in f 0)
"<stdin>" (line 1, column 8):
unexpected "x"
expecting "="
  • let rec expressions aren't recursive:
Poly> (let rec x = x in x)
Not in scope: "x"
  • Since fix is a special syntactic form that has to be applied to an expression, I expected g fix x not to parse. Instead, it is parsed as g (fix x).
@sdiehl sdiehl added the bug label Jan 21, 2015
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

2 participants