Union types using Curry-Howard isomorphism