From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pBNCRMxK007612 for ; Fri, 23 Dec 2011 13:27:22 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAEpz9E7V+6tl/2dsb2JhbABDrDeBBYFyAQEEATpECwtGFCiILgK3JIh1gjdjBJUBkjY X-IronPort-AV: E=Sophos;i="4.71,398,1320620400"; d="scan'208";a="124455900" Received: from eneide.happyleptic.org ([213.251.171.101]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 23 Dec 2011 13:27:17 +0100 Received: from extranet.securactive.org ([82.234.213.170] helo=ccellier.rd.securactive.lan) by eneide.happyleptic.org with esmtp (Exim 4.72) (envelope-from ) id 1Re4O6-0000sI-SA for caml-list@inria.fr; Fri, 23 Dec 2011 13:38:14 +0100 Received: from rixed by ccellier.rd.securactive.lan with local (Exim 4.72) (envelope-from ) id 1Re4DP-0006Jt-Ib for caml-list@inria.fr; Fri, 23 Dec 2011 13:27:11 +0100 Date: Fri, 23 Dec 2011 13:27:11 +0100 From: rixed@happyleptic.org To: caml-list@inria.fr Message-ID: <20111223122711.GB4433@ccellier.rd.securactive.lan> References: <4EF43609.6040609@rktmb.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [Caml-list] Format OCaml Code > Note that piping/redirection `camlp4o file.ml > foo` doesn't work as > camlp4o sends a marshalled AST by default. This is indeed annoying. Unfortunately, and quite surprisingly to me, using -o /dev/stdout does not help. > An issue with camlp4 is that it can sometimes move comments a bit: the > placement of comments in the reformatted source is approximative *with > respect to whitespace* (you sometimes have a blank inserted between a > phrase and the comment). I've seen a comment in a record initialization (to comment on a given field) moved far away, after the end of the record. Here is an exemple : --- type record = { a : int; b : int; c : int } let r1 = { a = 0 ; b = 1 ; (* This is about b *) c = 2 } --- where the comment disapear. While in this one : --- type record = { a : int ; b : int ; c : int } let r1 = { a = 0 ; b = 1 ; (* This is about b *) c = 2 } and r2 = { a = 0 ; b = 1 ; c = 2 } --- the comment is moved after initialization of r1. :-(