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 XAA08410; Sun, 29 Apr 2001 23:05:10 +0200 (MET DST) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA08583 for caml-list@pauillac.inria.fr; Sun, 29 Apr 2001 23:05:10 +0200 (MET DST) 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 UAA19304 for ; Fri, 27 Apr 2001 20:43:16 +0200 (MET DST) Received: from ajax1.sovam.com (ajax1.sovam.com [194.67.1.172]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f3RIhFL09930 for ; Fri, 27 Apr 2001 20:43:16 +0200 (MET DST) Received: from ts6-a63.Spb.dial.sovam.com ([195.190.96.63]:1390 "EHLO kouzdra.glokaya" ident: "root" whoson: "amoscal" smtp-auth: TLS-CIPHER: TLS-PEER: ) by ajax1.sovam.com with ESMTP id ; Fri, 27 Apr 2001 22:43:01 +0400 Received: from localhost (msk@localhost) by kouzdra.glokaya (8.9.3/8.9.3) with ESMTP id NAA08252; Fri, 27 Apr 2001 13:12:23 +0400 X-Authentication-Warning: kouzdra.glokaya: msk owned process doing -bs Date: Fri, 27 Apr 2001 13:12:23 +0400 (MSD) From: Anton Moscal X-Sender: msk@kouzdra.glokaya To: John Max Skaller cc: caml-list@inria.fr Subject: Re: [Caml-list] two unrelated questions In-Reply-To: <3AE80F56.DFDC823F@ozemail.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 26 Apr 2001, John Max Skaller wrote: > Unfortunately: > > let f x = > exception Break > try ... raise Break ... > with Break -> () > ;; > > is in error, because exception declarations must be at the top > level. This prevents desired localisation: this feature is not > as good as a labelled break for this purpose. For this problem workaround exists: let f x = let module M = struct exception Break let v = try ... raise Break ... with Break ->... end in M.v I made syntax extension for camlp4 and now can write something like this: let f x = let exception Break in ... Regards, Anton ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr