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 TAA07096 for caml-redistribution@pauillac.inria.fr; Wed, 8 Mar 2000 19:25:10 +0100 (MET) Resent-Message-Id: <200003081825.TAA07096@pauillac.inria.fr> 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 NAA23704 for ; Tue, 7 Mar 2000 13:28:13 +0100 (MET) Received: from suburbia.net (suburbia.net [203.4.184.1]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id NAA26075 for ; Tue, 7 Mar 2000 13:28:09 +0100 (MET) Received: by suburbia.net (Postfix, from userid 110) id 98A2A6C6F2; Tue, 7 Mar 2000 23:27:55 +1100 (EST) Sender: proff@suburbia.net To: caml-list@pauillac.inria.fr Subject: types returned from exceptions Cc: proff@iq.org From: Julian Assange Date: 07 Mar 2000 23:27:55 +1100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-From: weis@pauillac.inria.fr Resent-Date: Wed, 8 Mar 2000 19:25:10 +0100 Resent-To: caml-redistribution@pauillac.inria.fr I am trying to do the following: let f x = let foo = try f2 x with err -> exit 1 in .. However, there is a type conflict between (f2 x) and (exit 1). exit is defined as int -> 'a and seems intended to be used polymorphically for situations like this. Is there a way of forcing the return type of exit to match that of (f2 x)? Is there a better way of coding this type of construct? Cheers, Julian.