Perhaps like this? (Caveat: I typed this straight into gmail, I haven't tried to compile or run this code at all.) type ('a, 'b, 'c) tag = | Tag1 : ('a, int, int) tag | Tag2 : ('a, string, 'a) tag type 'a t = | Foo : ('a, 'b, 'c) tag * 'a * 'b -> 'c t On Fri, Jul 31, 2015 at 9:48 AM, Ashish Agarwal wrote: > I have: > > type _ t = > | Foo1 : 'a * int -> int t > | Foo2 : 'a * string -> 'a t > > but I really want to merge these two cases. I want the return type to be > based on the second arg when the second arg is int, and be based on the > first arg otherwise. Any way to accomplish that? > > -- Carl Eastlund