From a0bbe571bffbdaed38ba62aa07ca3063b1c994aa Mon Sep 17 00:00:00 2001 From: John Whitington Date: Mon, 2 Sep 2019 15:29:44 +0100 Subject: [PATCH] more --- ocamli2/ppx_interpret/ppx_interpret.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ocamli2/ppx_interpret/ppx_interpret.ml b/ocamli2/ppx_interpret/ppx_interpret.ml index 5677b68..f2c04a5 100644 --- a/ocamli2/ppx_interpret/ppx_interpret.ml +++ b/ocamli2/ppx_interpret/ppx_interpret.ml @@ -16,7 +16,7 @@ let preamble = ast let () = Tppxsupport.init () let template_string = "" let () = Print.showvals := false -let eval_full = Tppxsupport.eval_full env|} +let eval_full = Tppxsupport.eval_full_from_typedtree env|} let printas_text = function None -> "None" | Some x -> "(Some \"" ^ x ^ "!\")" @@ -84,6 +84,10 @@ let add_patmatch_printer default_mapper mapper expr = {case with pc_rhs = sequence} in {expr with pexp_desc = Pexp_function (List.map f cases); pexp_attributes = []} + | {pexp_desc; + pexp_attributes = [{attr_name = {txt ="interpret"}; attr_payload}]} as e -> + print_string "&&&&&&&&&&&&&&&&&&&&&&&&&Plain PPX found the [@interpret] annotation\n"; + e | e -> e (* Don't do anything. This needs to fixed properly to allow us to have multiple expr mappers which do not interfere with one another... *) let interpret_mapper argv =