DavePearce/Whiley — Issue #50: Intersecting Lists and their Negations
Author: DavePearce
Created: 2011-10-22 03:33:15+00:00
State: open

There seems to be a fundamental problem with the way intersection of types is determined. For example, currently we have that [int] & ![int] => [void]. This makes sense for other compound types, such as tuples, where e.g. (int,int) & !(int,int) => (void,void) which clearly reduces to void. But, for lists, [void] does *not* reduce to void.

Other interesting observations come out of this. For example, what is the type [real]-[int]? It should be the non-empty list of reals ... but there is no way to express this!