Hi, I am writing a PPX ‘special function’: writing-ppxs (ppxlib.writing-ppxs)
So I have it working but I’ve scoped it inside a module, eg:
# let post_order = Dream_html.Route.post "/orders/%s" (fun _ id ->
Dream.html ~status:`Created id);;
val post_order :
(string -> Dream.response Lwt.t, string -> Dream_html.attr)
Dream_html.Route.t = POST /orders/%s
However, when I open Dream_html.Route
, the special function name does not come into scope:
# open Dream_html.Route;;
# let get_order = get "/orders/%s" (fun _ id -> Dream.html id);;
Error: Unbound value get
Is there any way I can scope the special function inside my module in a normal way rather than having to hard-code its exact module path and name?