From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id A24CF7F7B4 for ; Mon, 10 Feb 2014 10:23:35 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of bmillwood@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bmillwood@janestreet.com"; x-sender="bmillwood@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of bmillwood@janestreet.com designates 38.105.200.229 as permitted sender) identity=mailfrom; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bmillwood@janestreet.com"; x-sender="bmillwood@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@tot-dmz-mxout1.janestreet.com) identity=helo; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bmillwood@janestreet.com"; x-sender="postmaster@tot-dmz-mxout1.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmsBAEmZ+FImacjlnGdsb2JhbABZhBu/TIEEHg4BAQEBAQYWCTyCHAkBAQQBJxkBATcBBAsLAwEHDS4iEgEFARwGE4dxAwkIAwKcEIsVhFcBBZQUIogxEQaOfQeEOJgvkDQYKYRZ X-IPAS-Result: AmsBAEmZ+FImacjlnGdsb2JhbABZhBu/TIEEHg4BAQEBAQYWCTyCHAkBAQQBJxkBATcBBAsLAwEHDS4iEgEFARwGE4dxAwkIAwKcEIsVhFcBBZQUIogxEQaOfQeEOJgvkDQYKYRZ X-IronPort-AV: E=Sophos;i="4.95,816,1384297200"; d="scan'208";a="57645142" Received: from mx5.janestreet.com (HELO tot-dmz-mxout1.janestreet.com) ([38.105.200.229]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 Feb 2014 10:23:34 +0100 Received: from tot-oib-smtp1.delacy.com ([172.27.22.15] helo=tot-smtp) by tot-dmz-mxout1.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1WCn5Q-0006Sj-Qx for caml-list@inria.fr; Mon, 10 Feb 2014 04:23:32 -0500 Received: from tot-dmz-mxgoog1.delacy.com ([172.27.224.14] helo=mxgoog2.janestreet.com) by tot-smtp with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WCn5Q-00027n-Pt for caml-list@inria.fr; Mon, 10 Feb 2014 04:23:32 -0500 Received: from mail-qa0-f54.google.com ([209.85.216.54]) by mxgoog2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1WCn5Q-0002PF-Mh for caml-list@inria.fr; Mon, 10 Feb 2014 04:23:32 -0500 Received: by mail-qa0-f54.google.com with SMTP id i13so9192063qae.27 for ; Mon, 10 Feb 2014 01:23:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ffGc2AugAP9UCEs/jo7SqbuBzb/3GdP/ZnES2Z+oznM=; b=FKowx/JR+8F/E+8bFME028VzsyxZojg0J14/srlCGWv+3BfDiXNzPcmaEwGvQ5Zx33 A3G0ew7Jo7JFhaUQAJJRnaaaCzBUw7oeqR6ibN/gTgRISX9gru36z0YANT9aM3r8cdBW k5W8r+zM/AwzqSv8xgDbcEwnkCAlLvaXbyDf0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ffGc2AugAP9UCEs/jo7SqbuBzb/3GdP/ZnES2Z+oznM=; b=lS5cLUDVQabCN9ULtaGDga3sFkeW947vDjHbFEb9kqY9C6cud2C4TE/IELk0m0nnNh IsI67sJDyrr/W8d0dxbcojGuPVZWe6XnOl/a7qDXC1wKCE17dV8A/6LXp8Sf7ZHW8wBH FVseFwBuKdLf/MKPfrIVXPV8qBmG4G743pj5dtT+FbWvgCLpZfWNnnmIYM4zKQhtvtgv eB6RrBV4Ila/XF5TMKfKKADEI9aUZoiBl8aaDT4x3GGo9zxzho5hJwK8o791LctcePEc i0wsaHtmoE3yISwFasZY9zZeAp6Me0rOAZ5GUNagwk4WTpZvWybiKuXW8GnXk4Qj45rw uJpg== X-Received: by 10.224.97.67 with SMTP id k3mr46200451qan.17.1392024212563; Mon, 10 Feb 2014 01:23:32 -0800 (PST) X-Gm-Message-State: ALoCoQlzQizglPunQWfnkLPOJb1FKYkej5DLkFMyZFYhRXB2fS6rmqQJCudXX8PqELSQDT/PlF2piCcKajU4VLcf0LB5FLRi6JSx3yaN5KsahtZ9zqr5bU4bWiGORC/WyV3ORYlww9MalX0fVcVADcdOw+q9WiCxgg== MIME-Version: 1.0 X-Received: by 10.224.97.67 with SMTP id k3mr46200440qan.17.1392024212463; Mon, 10 Feb 2014 01:23:32 -0800 (PST) Received: by 10.140.48.109 with HTTP; Mon, 10 Feb 2014 01:23:32 -0800 (PST) In-Reply-To: <20140210084746.GB26593@frosties> References: <20140206105811.GD28534@frosties> <20140210084746.GB26593@frosties> Date: Mon, 10 Feb 2014 09:23:32 +0000 Message-ID: From: Ben Millwood To: Goswin von Brederlow Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=001a11c3f2b4b4475a04f209e4bd Subject: Re: [Caml-list] Proposal: extend try to handle success --001a11c3f2b4b4475a04f209e4bd Content-Type: text/plain; charset=ISO-8859-1 On 10 February 2014 08:47, Goswin von Brederlow wrote: > On Thu, Feb 06, 2014 at 11:10:21AM +0000, Ben Millwood wrote: > > try (...) > > with val > > | Some x -> (...) > > | None -> (...) > > with exception > > | Not_found -> (...) > > That would break every existing source using exceptions. Unless the > exception in "with exception" is only required when using "with val". > Sure, make "exception" optional here, and correspondingly "val" optional in match. Or your idea, that works too. --001a11c3f2b4b4475a04f209e4bd Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 10 February 2014 08:47, Goswin von Brederlow <goswin-= v-b@web.de> wrote:
On T= hu, Feb 06, 2014 at 11:10:21AM +0000, Ben Millwood wrote:
> try (...)
> with val
> | Some x -> (...)
> | None -> (...)
> with exception
> | Not_found -> (...)

That would break every existing source using exceptions. Unless= the
exception in "with exception" is only required when using "w= ith val".

Sure, make "e= xception" optional here, and correspondingly "val" optional = in match. Or your idea, that works too.

--001a11c3f2b4b4475a04f209e4bd--