let union d1 d2 = match d1, d2 with | Int, Int -> Int | Nonint, Nonint -> Nonint | Real, _ -> Real | _, Real -> Real | Int, Nonint -> Real | Nonint, Int -> Real