From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id OAA16197 for caml-redistribution; Mon, 11 Mar 1996 14:22:08 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id MAA14882 for ; Mon, 11 Mar 1996 12:45:25 +0100 Received: from givry.inria.fr (givry.inria.fr [128.93.8.18]) by concorde.inria.fr (8.7.1/8.7.1) with ESMTP id MAA10437; Mon, 11 Mar 1996 12:45:31 +0100 (MET) Received: from givry.inria.fr (localhost.inria.fr [127.0.0.1]) by givry.inria.fr (8.6.10/8.6.6) with ESMTP id MAA27609; Mon, 11 Mar 1996 12:45:24 +0100 Message-Id: <199603111145.MAA27609@givry.inria.fr> From: Francis Dupont To: Tarizzo Martial cc: caml-list@pauillac.inria.fr Subject: Re: Recursion, exception and continuations In-reply-to: Your message of Sat, 09 Mar 1996 17:02:16 +0100. <199603091602.RAA19039@storm.certix.fr> Date: Mon, 11 Mar 1996 12:45:23 +0100 Sender: weis In your previous mail you wrote: [3] I appreciate the type system of CAML, but is a such system compatible with access to continuations, as it is possible to do in Scheme ? => I disagree Pierre Weis, the answer is yes and no because of the toplevel. Here is a short summary of the problem: a continuation is the functional abstraction of a context, ie for the context C[ ] the associated continuation is fun x -> C[x]. Obviously two types are involved in a context, the hole type and the embracing type but there is usually only one type in a continuation (the type of the hole/argument). It doesn't matter if the continuation is used in a program or in *one* toplevel statement, but there is a problem if a toplevel statement produces a continuation used in an other toplevel statement: the type system can be broken or the extend of the continuation must be constrained... See SML of New Jersey for correction attempts! Regards Francis.Dupont@inria.fr PS: some continuation constructs have been proposed with different scope, extend and typing rules and without the toplevel problem, but there are not the Scheme callcc operator. Some of them can be expansed in a CPS program of rather the same size (read papers by Olivier Danvy & all).