I'm not sure exactly why this doesn't work:type dir = [`North | `South | `East | `West | `Up | `Down]let index = function| `North -> 1| `South -> 2| `East -> 3| `West -> 4| `Up -> 5| `Down -> 6class foo = object(self)val mutable heading = `Upmethod flip_heading =heading <- match heading with `Up -> `Down | `Down -> `Upmethod get_direction (x : dir) = index xmethod get_heading = self#get_direction headingendit fails withFile "test.ml", line 28, characters 42-49:Error: This expression has type [ `Down | `Up ]but an expression was expected of type dirThe first variant type does not allow tag(s)`East, `North, `South, `Westbut why is that an error? I'd think that any function that accepts type dir should accept type [`Down | `Up] as well. Also, how do I get this to work?martin