H/T to Gabriel Scherer for answering at caml-list.
Don't use this kind of abstract type definition. Use instead (and export) concrete definitions (even if you don't use their constructors for anything)
type 'a s = S of 'a
(or just
type 'a s = S
)They have "better" injectivity properties. We've mentioned in on the mailing-list a couple of time, and it's also the "easy take-away lesson" from Jacques Garrigue talk at the OCaml workshop in September.
Shame on me for not googling for the problem. Here the exact problem is addressed: GADTs : a type variable cannot be deduced