You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
Loading this single-line file into REPL works:
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 thein
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.The text was updated successfully, but these errors were encountered: