You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, if S <: T, (</> S T) can be simplified to (</> T). A more complicaed example is that (</> (<Assortment> #f) <char>) to (<?> <char>) etc.
The advantage is that type predicates such as of-type? or subtype? can be quicker.
Issues:
Suppose A <: B and A <: C but B and C are not subclass to another. We want (</> A B C) and (</> A C B) to be end up to the same type, but simple left- or right-fold won't cut it. Need some sort of consistent ordering. (The ordering also help to make memoization of type constructors, by allowing (</> X Y) and (</> Y X) share the same instance).
Should we simplify (</> A) to A? They behave the same with of-type? and subtype?, but the former can't be used with make. So probably not.
(</> (<Assortment> #f) <boolean>) can be (</> <boolean>) and (<?> <boolean>). This is a special case so we can handle it separately, maybe.
The text was updated successfully, but these errors were encountered:
For example, if
S <: T
,(</> S T)
can be simplified to(</> T)
. A more complicaed example is that(</> (<Assortment> #f) <char>)
to(<?> <char>)
etc.The advantage is that type predicates such as
of-type?
orsubtype?
can be quicker.Issues:
A <: B
andA <: C
butB
andC
are not subclass to another. We want(</> A B C)
and(</> A C B)
to be end up to the same type, but simple left- or right-fold won't cut it. Need some sort of consistent ordering. (The ordering also help to make memoization of type constructors, by allowing(</> X Y)
and(</> Y X)
share the same instance).(</> A)
toA
? They behave the same withof-type?
andsubtype?
, but the former can't be used withmake
. So probably not.(</> (<Assortment> #f) <boolean>)
can be(</> <boolean>)
and(<?> <boolean>)
. This is a special case so we can handle it separately, maybe.The text was updated successfully, but these errors were encountered: