Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Eric Cooper <ecc@cmu.edu>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Private exceptions
Date: Wed, 1 Feb 2006 11:36:40 -0500	[thread overview]
Message-ID: <20060201163640.GB20172@localhost> (raw)
In-Reply-To: <43DE235C.5050404@barettadeit.com>

On Mon, Jan 30, 2006 at 03:31:56PM +0100, Alessandro Baretta wrote:
> [...]
> In this situation, I'd like to be able to declare an exception "private" to 
> a module, such that that exception can only be matched within the scope of 
> the exception declaration. I am currently sidestepping the problem by using 
> an exception which is not exported by the defining module, and consequently 
> cannot be matched explicitly, but it can be matched by a try <expr> with _ 
> -> <whatever>.

But the ability to match any exception (and re-raise it, without
knowing anything more about it) is essential for implementing
constructs like "unwind-protect", "with-open-file", suspend/force,
etc.

-- 
Eric Cooper             e c c @ c m u . e d u


  reply	other threads:[~2006-02-01 16:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-30 14:31 Alessandro Baretta
2006-02-01 16:36 ` Eric Cooper [this message]
2006-02-01 17:21   ` [Caml-list] " Alessandro Baretta

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=20060201163640.GB20172@localhost \
    --to=ecc@cmu.edu \
    --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