caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Teller <David.Teller@univ-orleans.fr>
To: Caml <caml-list@yquem.inria.fr>
Subject: Revised syntax error messages ?
Date: Tue, 05 Feb 2008 13:45:01 +0100	[thread overview]
Message-ID: <1202215501.6226.33.camel@Blefuscu> (raw)

   Hi everyone,
 At the moment, when using the revised syntax, the toplevel prints
typing error messages with the revised syntax but ocamlc seems to print
them with the original syntax, which may be confusing.

For instance, in the toplevel :

# match [] with [ Some _ -> 1 | None -> 2 ];
                       ^
This pattern matches values of type option 'a
but is here used to match values of type list 'b


With ocamlc :

yoric@Blefuscu:/tmp$ ocamlc -pp camlp4rf test.ml 
File "test.ml", line 1, characters 21-22:
This pattern matches values of type 'a option
but is here used to match values of type 'b list

This may be quite confusing for beginners. Is there a way to get the
revised syntax error messages with ocamlc ?

Thanks,
 David

-- 
David Teller
 Security of Distributed Systems
  http://www.univ-orleans.fr/lifo/Members/David.Teller
 Angry researcher: French Universities need reforms, but the LRU act brings liquidations. 


             reply	other threads:[~2008-02-05 13:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 12:45 David Teller [this message]
2008-02-05 13:35 ` [Caml-list] " Nicolas Pouillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1202215501.6226.33.camel@Blefuscu \
    --to=david.teller@univ-orleans.fr \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).