From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 91D8EBC8E for ; Thu, 23 Jun 2005 10:04:32 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j5N84WZY017671 for ; Thu, 23 Jun 2005 10:04:32 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA26392 for ; Thu, 23 Jun 2005 10:04:31 +0200 (MET DST) Received: from smtp004.mail.ukl.yahoo.com (smtp004.mail.ukl.yahoo.com [217.12.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id j5N84VUQ017667 for ; Thu, 23 Jun 2005 10:04:31 +0200 Received: (qmail 87507 invoked from network); 23 Jun 2005 08:04:31 -0000 Received: from unknown (HELO ?10.0.0.115?) (pasckosky@213.255.109.130 with plain) by smtp004.mail.ukl.yahoo.com with SMTP; 23 Jun 2005 08:04:30 -0000 Message-ID: <42BA6D0E.5000800@yahoo.it> Date: Thu, 23 Jun 2005 10:04:30 +0200 From: Luca Pascali User-Agent: Debian Thunderbird 1.0.2 (X11/20050331) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] exception Failure and failwith References: <42B7D0FD.5090305@barettadeit.com> <20050621090740.GA10021@yquem.inria.fr> <42B7F6E2.3010508@yahoo.it> <20050621113440.GA3794@yquem.inria.fr> <20050621185506.GA7604@force.stwing.upenn.edu> In-Reply-To: <20050621185506.GA7604@force.stwing.upenn.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 42BA6D10.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42BA6D0F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 failwith:01 lovas:01 maranget:01 redefinition:01 struct:01 cheers:01 enumeration:01 redefining:01 baretta:01 baretta:01 ...:98 ...:98 gratis:98 wrote:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.5 required=5.0 tests=FROM_ENDS_IN_NUMS autolearn=disabled version=3.0.2 X-Spam-Level: William Lovas wrote: >On Tue, Jun 21, 2005 at 01:34:40PM +0200, Luc Maranget wrote: > > > [...] > >In fact, one could easily build such a "Core" module as a user, following >Julien's advice: > > > It's what I did. I added to my project a module named core. This module just has the redefinition of exceptions >>>exception Prim_Failure = Failure >>> >>>to get rid of any further shadowing. >>> >>> > >Just take this to the next level with something like: > > module Core = > struct > exception Failure = Failure > type 'a opt = 'a option = None | Some of 'a > type 'a option = 'a opt > (* ... *) > end > > [...] >cheers, >William > > > At the moment, in my module, I put only the exceptions, because they are the most critical. (It's easier to use a name like Failure for an exception or an enumeration, instead of redefining an option type). Anyway if I will ever need to redefine built-in enumerations too, I will use your method. Bye LP -- ********************************************************************* Luca Pascali luca@barettadeit.com asxcaml-guru@barettadeit.com http://www.barettadeit.com/ Baretta DE&IT A division of Baretta SRL tel. 02 370 111 55 fax. 02 370 111 54 Our technology: http://www.asxcaml.org/ http://www.freerp.org/ ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it