c-cube / ocaml-trace

Common interface for tracing/instrumentation libraries in OCaml
https://c-cube.github.io/ocaml-trace/
22 stars 6 forks source link

change meta_map impl to use OCaml 5.1 Type module #8

Closed tatchi closed 1 year ago

tatchi commented 1 year ago

Just something I did for learning purposes, and I thought I would share it anyway, in case it might interest you. Feel free to close it.

This replaces the meta_map implementation to use the upcoming stdlib type module. Since it's not available for version below 5.1, we need to copy the code. In the first commit, I generate both ml{i} files in gen.ml. But later (second commit) I decided to just inline the Type module directly into meta_map.ml.

c-cube commented 1 year ago

I'm not too sure about this right now, do you mind if I let this PR sit for a while? Let's see what Type looks like in practice when 5.1 is released :)

tatchi commented 1 year ago

Not at all, feel free to close it at any time :)

c-cube commented 1 year ago

Ok, let's reconsider in a few months/years I guess :sweat_smile: . But intriguing, thanks!