Bill Page - 2014-05-22

In analogy with Record perhaps this should be

setelt! : (Union(Integer, Integer),1,Integer) -> Integer
setelt! : (Union(Integer, Integer),2,Integer) -> Integer

and

setelt! : (Union(a : Integer, b : Integer),a,Integer) -> Integer
setelt! : (Union(a : Integer, b : Integer),b,Integer) -> Integer

On the other hand in the case of labelled union I do prefer your suggestion of extra implicitly defined injection functions. In this case there should be analogous projection functions for the Record constructor

a: Record(a : Integer, b : Integer) -> Integer
b: Record(a : Integer, b : Integer) -> Integer

in addition to or instead of the selectors .a and .b

BTW, I presume the selectors should appear as elt but they are displayed oddly by

)show Record(a : Integer, b : Integer)