I'd do this by defining one in terms of the other. The following expression will ensure the property, though:
(lambda () (ann (values (ann (error 'fail) T)) U)) This typechecks if and only if T is a subtype of U (regardless of T and U). The thunk ensures that it doesn't really raise an error. On Fri, Aug 19, 2011 at 6:52 PM, Danny Yoo <d...@cs.wpi.edu> wrote: > > Let's say that I have two union types, and want to statically make > sure that one is a subset of the other, to prevent some silly bug. Is > there a way to express this directly in Typed Racket? > _________________________________________________ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/users -- sam th sa...@ccs.neu.edu _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users