caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] unmatched paren when using #use in toplevel
@ 2015-06-17  1:50 Kenichi Asai
  2015-06-17  8:08 ` Gabriel Scherer
  0 siblings, 1 reply; 2+ messages in thread
From: Kenichi Asai @ 2015-06-17  1:50 UTC (permalink / raw)
  To: caml-list

When I have a file with unmatched parenthesis:

test.ml:
1 + (2 * 3

and include it using #use, the ocaml toplevel says:

% ocaml
        OCaml version 4.02.1

# #use "test.ml";;
Syntax error: ')' expected, the highlighted '(' might be unmatched
#

with underline at the space immediately after "#use", but it should
show a file name, line number, and characters.  In case of a type
error:

test.ml:
1 + (2 *. 3)

% ocaml
        OCaml version 4.02.1

# #use "test.ml";;
File "test.ml", line 1, characters 5-6:
Error: This expression has type int but an expression was expected of type
         float
#

It displays the place of the error correctly.  (In OCaml 3.12.1, both
worked fine.)

Sincerely,

-- 
Kenichi Asai

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-17  8:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17  1:50 [Caml-list] unmatched paren when using #use in toplevel Kenichi Asai
2015-06-17  8:08 ` Gabriel Scherer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).