ocaml/dune

Preprocess using both cppo and PPXs

Open

#171 opened on Jun 27, 2017

 (14 comments) (5 reactions) (0 assignees)OCaml (478 forks)github user discovery
help wantedpreprocessing

Repository metrics

Stars
 (1,882 stars)
PR merge metrics
 (Avg merge 1d 20h) (345 merged PRs in 30d)

Description

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.

Contributor guide