From 0947d2d523d18ad1a9e25b92f89452a1c9a70350 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 9 Dec 2025 12:11:03 -0500 Subject: [PATCH] better error message --- src/ppx/ppx_trace.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ppx/ppx_trace.ml b/src/ppx/ppx_trace.ml index 6b1b2cc..f6327da 100644 --- a/src/ppx/ppx_trace.ml +++ b/src/ppx/ppx_trace.ml @@ -73,7 +73,10 @@ let expand_top_let ~ctxt rec_flag (vbs : _ list) = pstr_eval ~loc (pexp_constant ~loc (Pconst_string - ("ppxtrace: cannot trace `function`", loc, None))) + ( "ppxtrace: cannot trace `function`, please unsugar \ + to `fun`+`match`.", + loc, + None ))) []; ] ) | _ ->