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 MAA25280; Fri, 10 Jan 2003 12:03:24 +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 MAA24782 for ; Fri, 10 Jan 2003 12:03:23 +0100 (MET) Received: from kraid.nerim.net (smtp-101.nerim.net [62.4.16.101]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h0AB3M514844 for ; Fri, 10 Jan 2003 12:03:23 +0100 (MET) Received: from hector.lesours (lesours.starynkevitch.net [80.65.224.217]) by kraid.nerim.net (Postfix) with ESMTP id DAAC640FD7 for ; Fri, 10 Jan 2003 11:51:09 +0100 (CET) Received: from basile by hector.lesours with local (Exim 3.36 #1 (Debian)) id 18Wwwc-0003sm-00 for ; Fri, 10 Jan 2003 12:03:22 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <15902.43124.883844.293250@hector.lesours> Date: Fri, 10 Jan 2003 12:03:16 +0100 To: caml-list@inria.fr Subject: [Caml-list] suggestions: add a warning capability X-Mailer: VM 7.07 under Emacs 21.2.2 From: Basile STARYNKEVITCH Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Dear All (and Caml team) First a Happy New Year to all. Second, a suggestion to the Caml team. Add a warning ability, like the #warning of GCC. The idea would be that an expression can be warning message value, for instance let foo x = warning "foo should be implemented" 0 which should be compiled exactly like let foo x = 0 except that the compiler outputs a warning message with the "foo should be implemented" message at compile time. Perhaps I am showing my old (43) age, but I love to put compile-time warnings in code which I have to correct or implement! And yes, it is trivial to implement in Camlp4 - I did it in a couple of minutes. People wanting it now could fetch the latest (>= 1.8) revision of pa_trace.ml on http://www2.poesia-filter.org:8000/cgi-bin/cvsweb.cgi/PoesiaSoft/PoesiaMonIcap/pa_trace.ml?sortby=date I feel sometimes sorry that the default Ocaml parser is not Camlp4 (I guess that there are some internal conflictual issues somewhere on this...) This warning syntax is just syntactic sugar, like ignore and assert are. Both are very useful. A last tiny suggestion to Daniel de Rauglaudre - document a way to output error or warning messages in the usual format - I mean just provide a function output_error location message in Camlp4 library... (It is probably there already but I didn't notice it) Regards and thanks again to the Caml team. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet alias: basiletunesorg 8, rue de la Faïencerie, 92340 Bourg La Reine, France ------------------- 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