From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id E837EBC6C for ; Fri, 8 Feb 2008 13:40:08 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAADPcq0fAXQInh2dsb2JhbACQNQEBAQgKKZVnhU0 X-IronPort-AV: E=Sophos;i="4.25,321,1199660400"; d="scan'208";a="22400660" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 08 Feb 2008 13:40:08 +0100 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m18Ce0oa023235 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 8 Feb 2008 13:40:08 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAADPcq0fRVZKzkmdsb2JhbACQNQEBAQEHBAQJChaVaYVN X-IronPort-AV: E=Sophos;i="4.25,321,1199660400"; d="scan'208";a="22400659" Received: from wa-out-1112.google.com ([209.85.146.179]) by mail4-smtp-sop.national.inria.fr with ESMTP; 08 Feb 2008 13:40:06 +0100 Received: by wa-out-1112.google.com with SMTP id m34so455393wag.9 for ; Fri, 08 Feb 2008 04:40:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; bh=EzzK8LdNYMs7mObzJcCogJ8jttA/vg1H3XPbAney2iI=; b=qc1zb+4qwYi1MTaR28POqEXi23T8NF4hm9uxsHEdUCYhGY1ERrDIlMwqluZibMKPQGFVWJc8iBIDr2dWC99goecvhL2PAcMO9WTm0VWOvXupOb4a/G3tFox5tFlRjOwNj+TzwDey6QKEe/hwrxxhDAsILbWl7CdpGcr4TeDfyoY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; b=OfJp7InrAUAvlOcu4TmuD57pZfchEwgMVpluuhg83QnezNRNoVd5qhMz9BCN8vq1AEm4FpenzULDyEfXNdAI+ftptoCYFQlrlfsEYTNjfhgxnny2lzKOeePUxW4yBkBahGh1EnbHmmk922GQ10BfK97vjbHX/Y9stdKl3f/FDYU= Received: by 10.115.75.1 with SMTP id c1mr5214880wal.84.1202474405408; Fri, 08 Feb 2008 04:40:05 -0800 (PST) Received: from ?192.168.1.58? ( [85.2.49.125]) by mx.google.com with ESMTPS id d25sm31680021nfh.33.2008.02.08.04.40.04 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Feb 2008 04:40:04 -0800 (PST) Message-Id: From: =?ISO-8859-1?Q?B=FCnzli_Daniel?= To: caml-list List In-Reply-To: <20080208115635.GA2885@snarc.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v915) Subject: Re: [Caml-list] [OSR] Exceptionless error management, take 2 Date: Fri, 8 Feb 2008 13:40:09 +0100 References: <1202396482.6084.5.camel@Blefuscu> <20080208.001729.233402575.garrigue@math.nagoya-u.ac.jp> <20080208095333.GA582@snarc.org> <1202467938.47ac3462d077a@imp.free.fr> <20080208115635.GA2885@snarc.org> X-Mailer: Apple Mail (2.915) Sender: =?ISO-8859-1?Q?Daniel=20B=FCnzli?= X-Miltered: at concorde with ID 47AC4DA0.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bunzli:01 buenzli:01 semantics:01 compiler:01 integer:01 caml-list:01 variant:02 modules:02 match:02 match:02 redefine:03 module:03 module:03 daniel:04 daniel:04 Le 8 f=E9vr. 08 =E0 12:56, Vincent Hanquez a =E9crit : > For example, an `Error returned by module X could be use in a code > expecting an `Error returned by module Y, even though that the `Error > could means something totally different (semanticly). Only if they have exactly the same error cases (in which case they are =20= very likely to attach the same semantics to it). I think you fail to =20 think realisitically, chances are little that this is going to pose =20 any problems in practice. Do you redefine the option type in each of =20 your modules to be able to say this is an optional integer from module =20= X ? > If I use normal variant, the compiler will prevent me using the same =20= > code to match a X.Error and a Y.Error. Note that with this take 2 proposal -- that I personnaly find too =20 invasive and heavy weight -- you won't get that, you will have to =20 match on Error.Error (!) instead of `Error (take 1). Daniel