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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id D32177F1DE for ; Thu, 10 Jan 2013 09:14:20 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of david.mentre@gmail.com) identity=pra; client-ip=209.85.217.177; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="david.mentre@gmail.com"; x-sender="david.mentre@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of david.mentre@gmail.com designates 209.85.217.177 as permitted sender) identity=mailfrom; client-ip=209.85.217.177; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="david.mentre@gmail.com"; x-sender="david.mentre@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-lb0-f177.google.com) identity=helo; client-ip=209.85.217.177; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="david.mentre@gmail.com"; x-sender="postmaster@mail-lb0-f177.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ak4CABx37lDRVdmxlGdsb2JhbABEvWMIFg4BAQEBCQkLCRIpgh8BBUABOAEDDAEFBQsDOB8CARIBBQEcBhOIBwMPmhyPLoUNJw2GKgEFDIthhS0DjTuGe4FWizeDMRYpgViCPw X-IronPort-AV: E=Sophos;i="4.84,443,1355094000"; d="scan'208";a="189212683" Received: from mail-lb0-f177.google.com ([209.85.217.177]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Jan 2013 09:14:20 +0100 Received: by mail-lb0-f177.google.com with SMTP id n10so266478lbo.22 for ; Thu, 10 Jan 2013 00:14:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=7NmAYah5cLGzu2+vcBqpe1Sm+Zt+glXwLvG568FtAxU=; b=E2FPMjPBCZQiYDvP2iox4/aPEOUzhq5rfBV04viogZKJPe5y0VCSKOGCoZnjqz+HAS m8odAvqgvV7MxTMjYi48vEJKO+sw9rWIwbIh7y5ZWcuY4ZadlDCjF35wVlNozW+6Fa1h 7naHUftaP9V5slSAh13Usamw2SeAmBN1Gev0fMGA+g5P0Tqqgq5moD5gubzAiB4erpb3 aolBtJaBSW53HCteelGdS9FBLIgaqXXyTxNAwDKTttAZ7LVlj0hxnBeFkIFPb9sZbCIp wgM6pyxBEBdgvoJ5Mzq/gXt+rLWOKBws2IOIBtkKRv1emK75+fswWfwCDOXhD/AAuCCO OZBg== Received: by 10.152.47.75 with SMTP id b11mr66623096lan.14.1357805659963; Thu, 10 Jan 2013 00:14:19 -0800 (PST) MIME-Version: 1.0 Sender: david.mentre@gmail.com Received: by 10.112.89.180 with HTTP; Thu, 10 Jan 2013 00:13:49 -0800 (PST) In-Reply-To: <878v82r7ql.fsf@li195-236.members.linode.com> References: <50ECE88D.9000905@riken.jp> <878v82r7ql.fsf@li195-236.members.linode.com> From: David MENTRE Date: Thu, 10 Jan 2013 09:13:49 +0100 X-Google-Sender-Auth: n_6lNK536yiE0OaQasY3Qxegxzw Message-ID: To: Malcolm Matalka Cc: Francois Berenger , caml-list Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] some beautiful OCaml code Hello, 2013/1/9 Malcolm Matalka : > The problem polymorphic variants are solving here is that if you want to > sequence unrelated functions but return their errors, you have to join > their return types with the return types of the function that is calling > them. Polymorphic variants basically do this for you without every > function defining its own error return variant. Thank you Malcolm, Gerd and Kristopher for the helpful comments. Best regards, david