Closed Drup closed 10 years ago
Can you give some examples of how the function would typically be used?
Sure: https://github.com/ocsigen/lwt/blob/ppx/ppx/ppx_lwt.ml#L116 Here you can see that I have a variable which is a pattern and I want to make it an expression (while keeping the location). So I pattern match a bit deeper to get the actual variable and just use str.
It seems to like an idiom worth repeating.
By the way, if you want motivating examples for metaquot, you can look at the difflog. The first implementation was without and the second with it. The diff is striking.
Ping. Can you just close the PR if you don't want the function ?
This seems a little bit too specific, and indeed, I think it's best left to client code to define such a helper function.
Note: I can't remove the compilation warning, since both Location.loc and Location.error have a loc field, with the same type.