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 FAA16585; Mon, 28 Jan 2002 05:23:22 +0100 (MET) 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 FAA16877 for ; Mon, 28 Jan 2002 05:23:22 +0100 (MET) Received: from mail11.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g0S4NGv15235 for ; Mon, 28 Jan 2002 05:23:21 +0100 (MET) Received: (qmail 9483 invoked from network); 28 Jan 2002 04:23:14 -0000 Received: from unknown (HELO kronstadt) ([64.81.49.223]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 28 Jan 2002 04:23:14 -0000 Received: from itz by kronstadt with local (Exim 3.33 #1 (Debian)) id 16V3K6-0006hB-00 for ; Sun, 27 Jan 2002 20:23:14 -0800 To: caml-list@inria.fr (OCAML) Subject: Re: [Caml-list] Location in source code References: From: Ian Zimmerman Date: 27 Jan 2002 20:23:13 -0800 In-Reply-To: Message-ID: <86665ndrym.fsf@speakeasy.org> User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Mathieu> Hello, I would like to be able to define in OCaml analogues Mathieu> of the cpp macros __FILE__ and __LINE__, for debugging Mathieu> purposes. For instance, I would like to be able to write Mathieu> Printf.printf "I had an error in module %s at line %d" Mathieu> __MODULE__ __LINE__ Isn't this what assertions are for? -- Ian Zimmerman, Oakland, California, U.S.A. GPG: 433BA087 9C0F 194F 203A 63F7 B1B8 6E5A 8CA3 27DB 433B A087 In his own soul a man bears the source from which he draws all his sorrows and his joys. Sophocles. ------------------- 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