From eb0f68d35147ab67c99f0d31aa1e2dd410266a49 Mon Sep 17 00:00:00 2001 From: Alain Frisch Date: Tue, 10 Sep 2013 14:15:47 +0000 Subject: [PATCH] Fix order of application of ppx rewriters (matching the order on the command-line). git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14086 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- driver/pparse.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/driver/pparse.ml b/driver/pparse.ml index 17ec3b68e..15a1bd397 100644 --- a/driver/pparse.ml +++ b/driver/pparse.ml @@ -91,7 +91,9 @@ let apply_rewriters magic ast = | [] -> ast | ppxs -> let fn = - List.fold_left (apply_rewriter magic) (write_ast magic ast) ppxs in + List.fold_left (apply_rewriter magic) (write_ast magic ast) + (List.rev ppxs) + in read_ast magic fn (* Parse a file or get a dumped syntax tree from it *)