Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
A simple ppx to remove some boilerplate when using the excelent Logs library.
Add this to your dune stanza for your executable
(preprocess
(pps logs-ppx))
Then you use it like this in OCaml:
[%log debug "Hello %s!" "world"]
(* Which genrates the following *)
Logs.debug (fun m -> m "Hello %s!" "world")
And in Reason it looks like this:
[%log debug("Hello %s!", "world")];
// Which generates the following
Logs.debug(m => m("Hello %s!", "world"));
A huge thanks goes to @davesnx for a lot of help and his starter repo