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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 5980E7F7C2 for ; Tue, 4 Feb 2014 18:00:47 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of yallop@gmail.com) identity=pra; client-ip=209.85.216.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yallop@gmail.com"; x-sender="yallop@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of yallop@gmail.com designates 209.85.216.170 as permitted sender) identity=mailfrom; client-ip=209.85.216.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yallop@gmail.com"; x-sender="yallop@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qc0-f170.google.com) identity=helo; client-ip=209.85.216.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yallop@gmail.com"; x-sender="postmaster@mail-qc0-f170.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjQDAKUb8VLRVdiqlGdsb2JhbABZg0RXgwG8HQgWDgEBAQEHCwsJEiqCTx0BGx4DEhAPAiYCJAERAQUBIhuHaAEDEQ2dMIMJjApTgwmTbgoZJw1kiE8RAQUMgR2QQoFJBJgrgTKPAhgphFk8 X-IPAS-Result: AjQDAKUb8VLRVdiqlGdsb2JhbABZg0RXgwG8HQgWDgEBAQEHCwsJEiqCTx0BGx4DEhAPAiYCJAERAQUBIhuHaAEDEQ2dMIMJjApTgwmTbgoZJw1kiE8RAQUMgR2QQoFJBJgrgTKPAhgphFk8 X-IronPort-AV: E=Sophos;i="4.95,780,1384297200"; d="scan'208";a="47785923" Received: from mail-qc0-f170.google.com ([209.85.216.170]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 04 Feb 2014 18:00:46 +0100 Received: by mail-qc0-f170.google.com with SMTP id e9so14388452qcy.29 for ; Tue, 04 Feb 2014 09:00:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=5/cRWY8oB9ySaC9x0Q2da/HotWB3C8neP2q0Stm7ek4=; b=SwzwOErWlUQlP7XdUCqM1j6zkfQU7Coa7ybtf/eaWdj3S9q3Lf4bU0G/3sv5Hy8UE0 zOSAaziAUEpMv9cPAvCXbvp9pJPSEUmSlNvHT8uth8iQahC0L9dQxabxSwB5tJVYXGjR YZhbAviYcrwVtLDJ/CAR+HQkrcA12hYXWbtwzTcrnBVt/h90UPlcA/g+ikR/xoT96nrs EEQtOJ+h1TFEB9bsWjCa+QTORI1S+EXKLOxM1miTCzzARjuTEOwzNNIezjFFryyDLZjx aXEi6EgScb/0FwMq4SBhgMV9K7TXFrm+WCqBgq7yq4kYg4Ip0iQvnerXUb5fVmLcM/yP hBVQ== MIME-Version: 1.0 X-Received: by 10.140.42.180 with SMTP id c49mr64699011qga.24.1391533245652; Tue, 04 Feb 2014 09:00:45 -0800 (PST) Received: by 10.229.231.73 with HTTP; Tue, 4 Feb 2014 09:00:45 -0800 (PST) Date: Tue, 4 Feb 2014 17:00:45 +0000 Message-ID: From: Jeremy Yallop To: Caml List Content-Type: text/plain; charset=UTF-8 Subject: [Caml-list] Proposal: extend try to handle success The recent thread about the representation of options highlighted a shortcoming in the "try" construct: there isn't a convenient way to express code that should run when the body of the "try" doesn't raise an exception. I'd like to propose extending OCaml with a design once suggested by Christophe Raffalli which elegantly handles this case. The details, along with an implementation that you can try out, are in the following blog post: http://ocamllabs.github.io/compiler-hacking/2014/02/04/handler-case.html Feedback welcome! Jeremy