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 5E8D77EE89 for ; Wed, 25 Oct 2017 13:30:51 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mmatalka@gmail.com; spf=Pass smtp.mailfrom=mmatalka@gmail.com; spf=None smtp.helo=postmaster@mail-pg0-f41.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mmatalka@gmail.com) identity=pra; client-ip=74.125.83.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of mmatalka@gmail.com designates 74.125.83.41 as permitted sender) identity=mailfrom; client-ip=74.125.83.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.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@mail-pg0-f41.google.com) identity=helo; client-ip=74.125.83.41; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="postmaster@mail-pg0-f41.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AgKpopRy68WifEgrXCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?0egSIJqq85mqBkHD//Il1AaPBtqLra8cw8Pt8IneGkU4qa6bt34DdJEeHzQksu?= =?us-ascii?q?4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2TxTor3az9T8fHAnkfUow?= =?us-ascii?q?f7ytW93ktNmsz+2557HUZgxJgnL9PeIzf12KqlD+v8MMgIZmYp06yhbTr2EAL+?= =?us-ascii?q?tfz3lpKFbVhB3869295rZs9i1Rv7Qq8MsWAovgeKFtaLVcBzMiNigQ7dHisRrK?= =?us-ascii?q?BV+K43IAW2EVmzJHBgHE6FfxWZKn4XiyjfZ0xCTPZZ6+drszQzn3qvoyRQ=3D?= =?us-ascii?q?=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AiAQA7dfBZhilTfUpaHAEBBAEBCgEBF?= =?us-ascii?q?gEBAQMBAQEJAQEBhBiBAhOdJIF6glGVegojhAMBgRQChGtDFAEBAQEBAQEBAQE?= =?us-ascii?q?BEgEBAQgLCwgoL4I4BQEeBoI7AQEBAwFAARsSCwEDAQsGBQsNCQQhDwEEDQIRA?= =?us-ascii?q?QUBChgTEol1AQMNCAQMnEhAjhEFARyDCQWDZwoZJwMKWIJsAQEBAQEBAQEBAQE?= =?us-ascii?q?BAQEBAQEBGAIGCQEIgxyBNlGBUIUTgl6CC4YRBYg3DJh0PIdliBmEeYJyiGqHS?= =?us-ascii?q?o0NiEcCBAIEBQIGFCSBFTaBfDQhCB0VSTWCLwmCRB+Bc3aKR4FVAQEB?= X-IPAS-Result: =?us-ascii?q?A0AiAQA7dfBZhilTfUpaHAEBBAEBCgEBFgEBAQMBAQEJAQE?= =?us-ascii?q?BhBiBAhOdJIF6glGVegojhAMBgRQChGtDFAEBAQEBAQEBAQEBEgEBAQgLCwgoL?= =?us-ascii?q?4I4BQEeBoI7AQEBAwFAARsSCwEDAQsGBQsNCQQhDwEEDQIRAQUBChgTEol1AQM?= =?us-ascii?q?NCAQMnEhAjhEFARyDCQWDZwoZJwMKWIJsAQEBAQEBAQEBAQEBAQEBAQEBGAIGC?= =?us-ascii?q?QEIgxyBNlGBUIUTgl6CC4YRBYg3DJh0PIdliBmEeYJyiGqHSo0NiEcCBAIEBQI?= =?us-ascii?q?GFCSBFTaBfDQhCB0VSTWCLwmCRB+Bc3aKR4FVAQEB?= X-IronPort-AV: E=Sophos;i="5.43,431,1503352800"; d="scan'208";a="297837765" Received: from mail-pg0-f41.google.com ([74.125.83.41]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 25 Oct 2017 13:30:44 +0200 Received: by mail-pg0-f41.google.com with SMTP id g6so17083721pgn.6 for ; Wed, 25 Oct 2017 04:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=40cRMO3Ii4mbw/cWyVZFE4Kv/yik8ghcH3Ajy/mLrUc=; b=Y9T2+in/o2xmjWhnBpJ1Z6nz8KA8NC8RnhrCVY0IN4AalStyNBtQfW2oy+Hh1yFx/U 47eI+1KLBVuLEV5Vo3q6tKp8wSuHdNb/A65hiaoGIc7IlCWLegbH8K/WkLAToT1HNMiW QdiKdbMyT9o+3GAF6pjupoV0R2mKioHCeuP0k86lDQ/VdszmfbJ8Exa7UPNclQw4QsWi Lt652KwbXb9kf4nK4X9VJijJomvn0kTHMqHerxCLG0gmQ4DnvrhLq5AI6PYvOMrpvkb8 oGJKXYofW2KVn0t0iPpXm4/5rSMBnTfACpOBnEerxO++RuMtOQSN+LjHDZoawcUMyziu WelQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=40cRMO3Ii4mbw/cWyVZFE4Kv/yik8ghcH3Ajy/mLrUc=; b=UotWj6AezttwsY7ZUuR59T28BMLoy2pLzJg0qajtMbdE/VAGhzS21dii6LTf20VBh2 G3bBrsm2KddO+fyRfPvR9TYPR6Z3O7a7WaphqNpSNczUZQ6MCA9bWO65Ucwc2MnBXkH9 pyjscP57xGlyB5Y2idjHR36iXoa7zKgSsKq5ohL7lIVmtSOK65Wb0NdjeVNoG3eL+5Kl G7S/7n7QfRnAyK1r/IK1ehMgD7d2S4VuPPxv2pLd81v9rEKAfFcxrgnpHXAVc1wVmLyl WDr9IcO2nEJlKuz5MveTT5nvjHWUEm5BJa0gHh8ZDr0IEaEjVxqDVEAQvNe7BfKuF7PQ x9+g== X-Gm-Message-State: AMCzsaUUw1pHcynzTeHsT/p4OOBZ5AaIto8N4Fl7Xf1euB7BHinrQrhJ VppAts3W1Urju2B5r9SjPQO/eA/D X-Google-Smtp-Source: ABhQp+Q6vlBLhVV5ojcceyDMxhew2wCEHWHjUIy+/AwU9IjBW8baemWx7DQ5QDsT9hrX50fVaG1d9Q== X-Received: by 10.84.133.165 with SMTP id f34mr1489859plf.268.1508931042520; Wed, 25 Oct 2017 04:30:42 -0700 (PDT) Received: from localhost ([37.153.108.22]) by smtp.gmail.com with ESMTPSA id i11sm5435981pgc.88.2017.10.25.04.30.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 04:30:41 -0700 (PDT) From: Malcolm Matalka To: Gabriel Scherer Cc: SP , caml users References: <86o9p2ywgc.fsf@gmail.com> <867evnz79e.fsf@gmail.com> Date: Wed, 25 Oct 2017 11:30:38 +0000 In-Reply-To: (Gabriel Scherer's message of "Tue, 24 Oct 2017 13:16:40 +0200") Message-ID: <86vaj3xy5d.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] What if exn was not an open type? Gabriel Scherer writes: > Participants to this discussion may be interested in the article "Catch me > if you can", by David Teller, Arnaud Spiwack and Till Varoquaux, 2008: > > https://hal.inria.fr/inria-00432575 Thank you for this, Gabriel, very interesting. > > This is the year 2008 and ML-style exceptions are everywhere. Most modern >> languages, whether academic or industrial, feature some variant of this >> mechanism. Languages such as Java even feature static coverage-checking for >> such exceptions, something not available for ML languages, at least not >> without resorting to external tools. In this document, we demonstrate a >> design principle and a tiny library for managing errors in a functional >> manner, with static coverage-checking, automatically-inferred, structurally >> typed and hierarchical exceptional cases, with a reasonable run-time >> penalty. Our work is based on OCaml and features monads, polymorphic >> variants, compile-time code rewriting and trace elements of black magic. > > > On Tue, Oct 24, 2017 at 1:11 PM, SP wrote: > >> On 22/10/2017 13:39, Malcolm Matalka wrote: >> > I'm one of those people that uses result everywhere + result monad where >> > the error case is a polymorphic variant. This lets me get the value of >> > an open type with power of an exhaustive pattern match check. No >> > strings needed. >> >> Nice! >> >> -- >> SP >> >> -- >> Caml-list mailing list. Subscription management and archives: >> https://sympa.inria.fr/sympa/arc/caml-list >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >> Bug reports: http://caml.inria.fr/bin/caml-bugs >>