ppx_tools icon indicating copy to clipboard operation
ppx_tools copied to clipboard

ppx_metaquot should include location info

Open whitequark opened this issue 10 years ago • 4 comments

Right now the type errors are confusing:

File "_none_", line 1:
Error: This pattern matches values of type Parsetree.expression
       but a pattern was expected which matches values of type
         Parsetree.expression_desc

whitequark avatar Jun 24 '14 18:06 whitequark

A good test case for this problem:

[%expr fun x -> [%e Exp.variant (int_encoding typ) [%expr (Int64.to_string x)]]]

whitequark avatar Sep 06 '14 08:09 whitequark

+1 Absolutely

This would be awesome, if it just allowed you to pass in a single location that all the generated ast's would share.

charlesetc avatar Oct 16 '16 07:10 charlesetc

@Charlesetc That's already there; see https://github.com/alainfrisch/ppx_tools/blob/master/ppx_metaquot.ml#L28-L38

whitequark avatar Oct 16 '16 07:10 whitequark

Just saw that! True - thanks

charlesetc avatar Oct 16 '16 07:10 charlesetc