From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7C9hQiW000420 for ; Fri, 12 Aug 2011 11:43:26 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwCADT1RE5CbwQbkWdsb2JhbABBp3EUAQEBAQkLCwcUBCGCBzgCOxYYAwIBAgFLDQgBARaHWbw8BYZHh2OQPIRphxs X-IronPort-AV: E=Sophos;i="4.67,361,1309730400"; d="scan'208";a="115658477" Received: from out3.smtp.messagingengine.com ([66.111.4.27]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 12 Aug 2011 11:43:21 +0200 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.messagingengine.com (Postfix) with ESMTP id DB4FD21474 for ; Fri, 12 Aug 2011 05:43:19 -0400 (EDT) Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute4.internal (MEProxy); Fri, 12 Aug 2011 05:43:19 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:content-type:content-transfer-encoding; s=smtpout; bh=a eZBtzcWJKWESwQ2mnZ8eJMeCAo=; b=IWAn5e/kN8UCQwSTIM5G5kUY+201QGW+o WKr4t+ffbfPjiFoxW4eEik+DgbCgYRHBdoBfdLWNBOYcdwv18k9YyXEXORKofnW/ GF5zV8O/oBVnNkJ2Bn87HYKDbS19q/pZR3XlXuoRHRDXwzoWpQJqKG/xsErUYBqF aWGlR2P9Dw= X-Sasl-enc: bl+HMWQni90J5OSDxMU7nt8o0Qae83u3i6O9JtjIfNpg 1313142199 Received: from [192.168.2.2] (c-98-248-39-171.hsd1.ca.comcast.net [98.248.39.171]) by mail.messagingengine.com (Postfix) with ESMTPSA id 8C40B45C5E6 for ; Fri, 12 Aug 2011 05:43:19 -0400 (EDT) Message-ID: <4E44F5E5.6080102@ens-lyon.org> Date: Fri, 12 Aug 2011 02:44:05 -0700 From: Martin Jambon User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20101023 Lightning/1.0b3pre Thunderbird/3.1.3 MIME-Version: 1.0 To: OCaml Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Caml-list] [ANN] cppo 0.9.2 - cpp for OCaml Dear list, I would like to announce the release of cppo 0.9.2 which contains a few additional features since the last announcement in 2009. http://martin.jambon.free.fr/cppo.html cppo is a lightweight preprocessor analogous to cpp and compatible with the OCaml syntax. It provides the classic directives #define, #include, #ifdef, etc. Documentation: http://martin.jambon.free.fr/cppo-manual-0.9.2.txt New features: 1. #ext directive: calling external preprocessors 2. STRINGIFY and CONCAT 1. #ext directive: calling external preprocessors ================================================= The new #ext directive allows to call an external command to process a lines of input until #endext. $ cat example1.ml let msg = #ext rot13 "BPnzy ehyrf!" #endext let () = print_endline msg $ ocamlopt -o example1 \ -pp "cppo -x rot13:\"tr '[a-zA-Z]' '[n-za-mN-ZA-M]'\"" example1.ml $ ./example1 OCaml rules! 2. STRINGIFY and CONCAT ======================= STRINGIFY allows to build string literals from unquoted text. This is useful for including source code in error messages. STRINGIFY(foo) is the equivalent of #foo in cpp syntax. CONCAT concatenates its two arguments into a single identifier. CONCAT(a, b) is the equivalent of a ## b in cpp syntax. Enjoy. Martin -- P.S.: follow my tech-focused channel on Twitter for more organic news: http://twitter.com/mjambontech