The Key.V allocations here on each fun calls could be avoided by storing the existential in the key itself here in a ekey : t field to be defined via a let rec.
Key.V
ekey : t