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 WAA24669; Wed, 23 Jan 2002 22:44:08 +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 WAA24880 for ; Wed, 23 Jan 2002 22:44:07 +0100 (MET) Received: from smtp013.mail.yahoo.com (smtp013.mail.yahoo.com [216.136.173.57]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id g0NLi6T08703 for ; Wed, 23 Jan 2002 22:44:06 +0100 (MET) Received: from adsl-63-195-80-23.dsl.snfc21.pacbell.net (HELO aria.yahoo.com) (63.195.80.23) by smtp.mail.vip.sc5.yahoo.com with SMTP; 23 Jan 2002 21:44:05 -0000 Message-Id: <5.1.0.14.0.20020123134005.022fce30@pop.mail.yahoo.com> X-Sender: joelisp@pop.mail.yahoo.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 23 Jan 2002 13:48:15 -0800 To: Doug Bagley From: Charles Martin Subject: Re: [Caml-list] beginner question about camlp4 Cc: Caml List In-Reply-To: <15439.5751.37201.475994@ns.bagley.org> References: <5.1.0.14.0.20020123113751.022f34c0@pop.mail.yahoo.com> <5.1.0.14.0.20020123113751.022f34c0@pop.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >Are you sure that's right? I think (f chan) executes before the call >to protect, and you want protect to execute f: That's my punishment for not cutting and pasting actual code :) let with_input_file fname f = let chan = open_in fname in protect (fun () -> f chan) (fun () -> close_in chan) _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr