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 LAA10984; Thu, 10 Jun 2004 11:10:32 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 LAA11196 for ; Thu, 10 Jun 2004 11:10:31 +0200 (MET DST) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i5A9AUEV020545 for ; Thu, 10 Jun 2004 11:10:30 +0200 Received: from localhost (akasha.ijm.jussieu.fr [134.157.173.57]) by shiva.jussieu.fr (8.12.11/jtpda-5.4) with ESMTP id i5A9AU5P054341 ; Thu, 10 Jun 2004 11:10:30 +0200 (CEST) X-Ids: 164 Date: Thu, 10 Jun 2004 11:10:29 +0200 (CEST) Message-Id: <20040610.111029.06877068.andrieu@ijm.jussieu.fr> To: Diego.FERNANDEZ_PONS@etu.upmc.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] Assert fail in partial application From: Olivier Andrieu In-Reply-To: References: X-Mailer: Mew version 4.0.64 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 40C82586.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at shiva.jussieu.fr with ID 40C82586.005 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Antivirus: scanned by sophie at shiva.jussieu.fr X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 andrieu:01 andrieu:01 pons:01 2004:99 val:01 val:01 fernandez:01 int:01 int:01 olivier:02 olivier:02 assert:02 assert:02 exception:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Diego Olivier Fernandez Pons [Thu, 10 Jun 2004]: > Bonjour, > > I would like a function that contains an assert to fail in partial > application and the test are still removed when compiling in noassert > mode > > # let f = fun x y -> assert (x > 0); assert (y > 0); x + y > val f : int -> int -> int > # f 0;; > - : int -> int = > # f 0 0;; > Exception: Assert_failure (" ", 1, 19). nothing specific to assert here, regular partial application works: # let f = fun x -> assert (x > 0) ; fun y -> assert (y > 0) ; x + y ;; val f : int -> int -> int = # f 0 ;; Exception: Assert_failure ("", 1, 17). -- Olivier ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners