type or<`a, `b> = Left(`a) | Right(`b)

let x : int = match (Left<int, int>(22)) {
  Left<int, int>((x : int)) | Right<int, int>((x : int)) -> x
}