From: Richard Jones <rich@annexia.org>
To: caml-list@inria.fr
Subject: Strange parsing of with-clauses
Date: Mon, 29 Nov 2004 16:26:40 +0000 [thread overview]
Message-ID: <20041129162640.GA27030@annexia.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 821 bytes --]
Not a big problem, but strange nevertheless:
# exception E of string * string;;
exception E of string * string
# let f () = raise (E ("a", "b"));;
val f : unit -> 'a = <fun>
# try f (); failwith "Not found" with E (a,b) -> (a,b);;
- : string * string = ("a", "b")
# try f (); failwith "Not found" with E t -> t;;
---
The constructor E expects 2 argument(s), but is here applied to 1 argument(s)
(In my actual code I want to return the thrown tuple to the caller).
Rich.
--
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
>>> http://www.team-notepad.com/ - collaboration tools for teams <<<
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
Use Perl libs in OCaml - http://www.merjis.com/developers/perl4caml
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2004-11-29 16:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-29 16:26 Richard Jones [this message]
2004-11-29 16:46 ` [Caml-list] " Alex Baretta
2004-11-29 17:04 ` Olivier Andrieu
2004-11-29 19:41 ` Stefan Monnier
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=20041129162640.GA27030@annexia.org \
--to=rich@annexia.org \
--cc=caml-list@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