ocaml/dune

Preprocess using both cppo and PPXs

Aperta

#171 aperta il 27 giu 2017

 (14 commenti) (5 reazioni) (0 assegnatari)OCaml (478 fork)github user discovery
help wantedpreprocessing

Metriche repository

Star
 (1882 stelle)
Metriche merge PR
 (Merge medio 1g 20h) (345 PR mergiate in 30 g)

Descrizione

From https://github.com/ocsigen/lwt/issues/411#issuecomment-311214821:

it is possible to both apply a PPX and preprocess with cppo, but it requires the [separate] cppo rule stanza, and so presumably a source file with a name like foo.cppo.ml. It would be nice if one could both apply cppo and PPXs to source named foo.ml.

This is not a high priority, but it would make files like lwt_unix.cppo.ml, where we both want to use cppo, and apply Bisect_ppx, ever so slightly more maintainable.

I'm basically thinking of being able to have either multiple preprocess stanzas, or list both pps and action in one preprocess stanza. There may, of course, be other, better ways.

Guida contributor