alainfrisch/ppx_tools — pull request #5 by whitequark (2014-06-19 19:12:56+00:00)
Title: Add [%stri] structure item pattern and expression quotation

I found that it greatly simplifies code that works on structure item level, e.g. in lwt.ppx:

structure_item = (fun mapper stri ->
match stri with
| [%stri let%lwt [%p? var] = [%e? exp]] ->
[%stri let [%p var] = Lwt_main.run [%e exp]]
| x -> default_mapper.structure_item mapper x)