From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA29185 for caml-redistribution; Mon, 8 Feb 1999 15:18:40 +0100 (MET) 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 KAA15426 for ; Mon, 8 Feb 1999 10:08:33 +0100 (MET) Received: from talbot.inria.fr (talbot.inria.fr [128.93.8.119]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id KAA12505 for ; Mon, 8 Feb 1999 10:08:31 +0100 (MET) Received: (from lefessan@localhost) by talbot.inria.fr (8.8.7/8.8.7) id KAA22226; Mon, 8 Feb 1999 10:08:30 +0100 From: Fabrice Le Fessant Message-ID: <14014.43405.765585.265897@talbot.inria.fr> Date: Mon, 8 Feb 1999 10:08:29 +0100 (CET) To: caml-list@inria.fr Subject: exceptions suggestions X-Mailer: VM 6.62 under Emacs 19.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=iso-8859-1 Sender: weis 1> A few months ago, someone asked why exceptions can't be redefined in different modules. For example, if I create two modules M and N, and I want only one module interface for them, I will create a module MN: m.ml exception Toto of int n.ml let x = 3 mn.mli val x : int exception Toto of int mn.ml let x = N.x exception Toto = M.Toto but the last line is not valid in Objective-Caml. What should I do ? 2> In ocaml, there is a directive install_printer to install special printers for abstract types. I think it would be interesting to have the same feature in the standard runtime for uncaught exceptions. Indeed, it is not always possible to know exactly where an exception is raised (in particular if you develop a library that will be used by other users) to install appropriate try ...with strutures to correctly print the exception arguments (This would be useful in Dynlink and Unix which already give printers for their errors, and in my Xlib, where XError exceptions carry important informations (such as RequestOpcode, etc)). I know that the uncaught exception is hard-coded in C. However, the compiler could create a try ... with structure around each module... - Fabrice