From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 4CF1BBB84 for ; Thu, 15 Jun 2006 01:46:36 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k5ENkZQ8006811 for ; Thu, 15 Jun 2006 01:46:35 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA20536 for ; Thu, 15 Jun 2006 01:46:35 +0200 (MET DST) Received: from smtp.syd.people.net.au (smtp.syd.people.net.au [218.214.225.98]) by nez-perce.inria.fr (8.13.6/8.13.6) with SMTP id k5ENkVCL006798 for ; Thu, 15 Jun 2006 01:46:33 +0200 Received: (qmail 13459 invoked from network); 14 Jun 2006 23:46:33 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 14 Jun 2006 23:46:33 -0000 Received: from coltrane (localhost [127.0.0.1]) by coltrane.mega-nerd.net (Postfix) with SMTP id 2DD527B67 for ; Thu, 15 Jun 2006 09:46:29 +1000 (EST) Date: Thu, 15 Jun 2006 09:46:28 +1000 From: Erik de Castro Lopo To: caml-list@inria.fr Subject: Re: [Caml-list] Resumable exceptions in plain OCaml Message-Id: <20060615094628.08a4f1e8.ocaml-erikd@mega-nerd.com> In-Reply-To: <20060614225403.69F73AC97@Adric.metnet.fnmoc.navy.mil> References: <20060614225403.69F73AC97@Adric.metnet.fnmoc.navy.mil> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.17; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 44909FDB.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44909FD7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 oleg:01 handler:01 node:01 ocaml:01 translated:01 sml:01 awe:98 wrote:01 caml-list:01 exception:01 exception:01 computation:01 computation:01 exceptions:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 oleg@pobox.com wrote: > > Resumable exceptions are the strict generalization of regular exceptions, > which lets the exception raising form return a value and so the > computation may continue. It's the exception handler that decides > either to abort the exceptional computation or to resume it with a > particular value. Resumable exceptions are made popular by Common > Lisp, where they are widely used: http://lambda-the-ultimate.org/node/1544 I read that on LtU and loved the idea. > We show a conservative and elementary implementation of resumable > exceptions in OCaml: the implementation is a self-contained 100% pure > OCaml library; makes no changes to the OCaml system; supports the > existing style of defining exceptions; is compatible with the ordinary > exceptions; works in byte- or natively-compiled code; uses the most > basic facilities of ML and so can easily be translated to SML. I am simply in *awe* that you managed to add this to Ocaml. Thanks you. Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ C++: The power, elegance and simplicity of a hand grenade.