From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA09387; Wed, 12 Mar 2003 09:45:17 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA10165 for ; Wed, 12 Mar 2003 09:45:16 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h2C8j6f11283; Wed, 12 Mar 2003 09:45:06 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA07890; Wed, 12 Mar 2003 09:45:05 +0100 (MET) Date: Wed, 12 Mar 2003 09:45:05 +0100 From: Xavier Leroy To: Brian Hurt Cc: Ocaml Mailing List Subject: Re: [Caml-list] Checked exceptions and type inference Message-ID: <20030312094505.A9667@pauillac.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0i In-Reply-To: ; from brian.hurt@qlogic.com on Tue, Mar 11, 2003 at 03:50:13PM -0600 X-Spam: no; 0.00; caml-list:01 inference:01 jacques:01 publi:01 java-style:01 higher-order:01 infer:01 annotations:01 ocaml:01 interfaces:01 exception:02 module:03 types:03 sufficient:04 exceptions:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Is there any research on using checked exceptions in an ML derived > language? Any plans/opinions on implementing checked exceptions in Ocaml? As Jacques mentioned, you can look at François Pessaux's work, e.g. our TOPLAS article http://pauillac.inria.fr/~xleroy/publi/exceptions-toplas.ps.gz Briefly, Java-style exception declarations just don't work with higher-order functions and parametric polymorphism. For ML, you need row polymorphism on the exception declarations to achieve sufficient precision, and the resulting types are complicated enough that you don't want to write them in module interfaces. The solution François explored is to infer completely these exception annotations with a whole-program analysis. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners