ocamlbuild icon indicating copy to clipboard operation
ocamlbuild copied to clipboard

define single-hook dispatchers

Open gasche opened this issue 9 years ago • 0 comments

This is a jolly good idea used in ocb-stubblr, see this code:

let after_rules f = function After_rules -> f () | _ -> ()

we could have one for each hook, and this would let people avoid the tedious | _ -> () in the common case of plugins that only dispatch on a single hook.

gasche avatar Oct 15 '16 02:10 gasche