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

Program-style let bindings parse in REPL although they shouldn't #33

Open
jstolarek opened this issue Feb 17, 2017 · 0 comments
Open

Program-style let bindings parse in REPL although they shouldn't #33

jstolarek opened this issue Feb 17, 2017 · 0 comments

Comments

@jstolarek
Copy link
Owner

Loading this single-line file into REPL works:

let abs = fun abs (x : int) : int => if x > 0 then x else (0 - x) in

The problem is that it shouldn't. Notice the in at the end of line - these kind of let bindings are not allowed in REPL and should be a parse error. Even more strangely deleting the in also works, which means both forms of let-bindings are accepted. This is a nice feature, but according to my understanding of the source code this should not work this way. I want to understand why it does work.

@jstolarek jstolarek changed the title Program-style let bindings parse in REPL althoughthey shouldn't Program-style let bindings parse in REPL although they shouldn't Feb 17, 2017
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

1 participant