> 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. :-(


-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to