From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA04064 for caml-redistribution; Wed, 19 Nov 1997 09:03:00 +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 SAA22763 for ; Tue, 18 Nov 1997 18:09:12 +0100 (MET) Received: from satie. (satie.univ-savoie.fr [193.48.123.65]) by concorde.inria.fr (8.8.7/8.8.5) with SMTP id SAA22024 for ; Tue, 18 Nov 1997 18:09:09 +0100 (MET) Received: from satie by satie. (SMI-8.6/SMI-SVR4) id RAA16604; Tue, 18 Nov 1997 17:59:38 GMT Message-ID: <3471D789.3782@univ-savoie.fr> Date: Tue, 18 Nov 1997 17:59:37 +0000 From: Christophe Raffalli X-Mailer: Mozilla 3.01Gold [fr] (X11; I; SunOS 5.5.1 sun4m) MIME-Version: 1.0 To: Pascal Zimmer CC: caml-list@inria.fr Subject: Re: Exceptions polymorphes References: <199711181357.OAA02954@dragon.ens-lyon.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: weis If you do what you suggest, the following program crashes (and is well typed *) exception Found of 'a;; let rec assoc_exn n = function [] -> raise Not_found | ((x,y)::l) -> if x = n then raise Found y else assoc_exn n l try assoc_exn 1 [1,2] with Found x -> print_string x (* x will be an integer, not a string *)