From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 5D318BBC4 for ; Wed, 1 Feb 2006 17:37:16 +0100 (CET) Received: from ux9.sp.cs.cmu.edu (UX9.SP.CS.CMU.EDU [128.2.220.166]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id k11GbF9P031812 for ; Wed, 1 Feb 2006 17:37:16 +0100 Received: from c-24-3-154-200.hsd1.pa.comcast.net ([24.3.154.200]) by ux9.sp.cs.cmu.edu id aa06528; 1 Feb 2006 11:36 EST Received: from ecc by stratocaster.home with local (Exim 4.60) (envelope-from ) id 1F4KyG-0005Gz-Sn for caml-list@yquem.inria.fr; Wed, 01 Feb 2006 11:36:40 -0500 Date: Wed, 1 Feb 2006 11:36:40 -0500 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Private exceptions Message-ID: <20060201163640.GB20172@localhost> Mail-Followup-To: caml-list@yquem.inria.fr References: <43DE235C.5050404@barettadeit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43DE235C.5050404@barettadeit.com> User-Agent: Mutt/1.5.11 From: Eric Cooper X-Miltered: at concorde with ID 43E0E3BB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 baretta:01 expr:01 re-raise:01 wrote:01 exception:01 exception:01 defining:01 matched:01 matched:01 explicitly:01 exceptions:01 match:02 constructs:02 declaration:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 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 with _ > -> . 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