Hi,

Maybe you already know that Caml is a very good language in term of
static checks (types, etc...).
Most of the time the first build you produce is almost working as
expected after you have been able to fix all the syntax error and
stupid type mistakes you did.

But I am a bit frustrated by the poor level of the compilation error
messages... It is quite hard to find the original problem and this is
certainly due to the fact that Ocaml is not a verbose language.

Anyway, consider the following code that is incorrect:
let a () =
  let p = 1;
  let a = 2;
  3;;

Ocaml gives an error message at the last "end", ")" or ";;" token.
Here at line 4.
I think that Ocaml should report the error earlier when there is a let
assignment immediately followed by a semi-colon.

Regards,
Delphin

NOTE: I am using Objective Caml version 3.11.0 so maybe this was fixed
later.
Anyway, unless there is a really good reason for that, I don't plan to
switch to a newer version since it frequently leads to Cygwin/MinGW
toolchain regressions.

-- 
You received this message because you are subscribed to the Google Groups 
"ocaml-developer" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ocaml-developer?hl=en
For other OCaml forums, see http://caml.inria.fr/resources/forums.en.html

Reply via email to