In the past, Julien Signoles programmed ocamldefun, a program that took OCaml source code with functors and obtained an equivalent program without functors. This is useful for optimization, analysis and other purposes.
It seems that ocamldefun is no longer maintained. Does there exist some equivalent tool?
Markus Mottl showed a camlp4 trick to do compile time functor instantiation (with some limitation). Take a look here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With