In the Map case, clearly the value type is not speficified, but I’m happy to reify it into module with a concrete type of char option CharMap.t.
I already use ppx_deriving for my own types, so usage of that is preferred if it can be done concisely. Per ppx_deriving#working-with-existing-types it should be feasible, but I’m wresting enough to request assistance. Will be trying to grok the following threads in the interim.
Which… makes sense. Could be pretty slick if the some sort of derivation/lookup occurred and was substituted in once traversal detected types w/ adequate printers, but that seems like a pretty advanced ask/task. The type system perhaps hasn’t even started its great work by the time this codegen takes place. I suspect such a feature may not even be feasible.