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

* Re: [Caml-list] unmatched paren when using #use in toplevel
  2015-06-17  1:50 [Caml-list] unmatched paren when using #use in toplevel Kenichi Asai
@ 2015-06-17  8:08 ` Gabriel Scherer
  0 siblings, 0 replies; 2+ messages in thread
From: Gabriel Scherer @ 2015-06-17  8:08 UTC (permalink / raw)
  To: Kenichi Asai; +Cc: caml users

Could you submit a bug report on the OCaml bug tracker?
  http://caml.inria.fr/mantis/

On Wed, Jun 17, 2015 at 3:50 AM, Kenichi Asai <asai@is.ocha.ac.jp> wrote:
> 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
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

^ 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).