Is there a way to have all polymorphic variants in an OCaml program renamed to maximum two characters each at preprocessing time, of course preserving their uniqueness? The renaming should be consistent for all program modules too.
Can someone sketch out a solution using Camlp4 + Hashtable or similar?