Re:Hindley-Milner Type Inference (2012)
by ufo on Friday July 10, 2020 @04:05PM
(#23795791)
If you use the "polymorphic variants" feature with backticks it automatically infers the union. However, most of the time the regular non-polymorphic variants are easier to work with.
A good discussion of this can be found in https://dev.realworldocaml.org/variants.html#scrollNav-4