| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
| |
If entries are type variables, we have to check their
instances for equality.
This came up onder the new or handling scheme.
|
|
|
|
| |
And remove the not used Printer#echo
|
|
|
|
| |
Not used yet, but we might use it as an alternative to typedArg invalidation later.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, a unified or otherwise instantiated type parameter
would be removed from the constraint, i.e. if it was the
last parameter of its polytype to be instantiated, the polytype
would be dropped. This is a potential problem since it means
that the alias `param = instance` is forgetten whereas we might
still need it in the same subtype test sequence.
The solution is to wait with cleaning up polytypes until
all associated type variables are fully instantiated.
This change uncovered another bug, where we failed
to follow an existing instantiation when adding to
a constraint. This manifested itself in deep subtype
errors for run/colltest1 and some others.
|
|
|
|
|
| |
The previous implementation of `replace` made it possible that formerly constrained
parameters would stay on embedded in bounds of other constraint enrties.
|
|
|
|
|
| |
Eliminate sameParams, add comments.
Also, minor cleanups elsewhere.
|
|
|
|
|
|
|
| |
Make them each inherit from common BaseType GenericType.
That way we avoid inheriting accidentally stuff from PolyType in TypeLambda.
Also, Fix adaptation of type lambdas. Don't confuse them with PolyTypes.
|
|
|
|
|
|
| |
We had problems printing constraints which are ill-formed, because
the basic operations & , | cause exceptions themselves. toString
serves as a fallback if show does not work.
|
|
|
|
|
| |
The operation on SimpleMap is eager. As suggested by @retronym we should
find a name different from the lazy Map#mapValues operation.
|
|
|
|
| |
Find a nicer way to express the same logic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were two instances where a constraint undergoing a replace would still refer
to poly params that are no longer bound after the replace.
1. In an ordering the replaced parameters was n ot removed from the bounds of the others.
2. When a parameter refers to the replaced parameter in a type, (not a TypeBounds), the
replaced parameter was not replaced.
We now have checking in place that in globally committable typer states, TypeVars are not instantiated
to PolyParams and (configurable) that constraints of such typer states are always closed.
Fixes #670.
|
| |
|
| |
|
|
|
|
|
|
|
| |
It's too hard to keep fixes up-to-date in both constraint implementations.
And anyway, OrderingConstraint is it for now.
Also added comment suggested by @smarter.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous code did not recognize some cases of dependent parameters.
E.g
P1 <: P2 | P3
P2 <: P4
P3 <: P4
In that case it follows that P1 <: P4
but that was not recorded in P's upper set.
|
| |
|
|
|
|
| |
See comment in OrderingConstraint#replace.
|
|
This is one both a bit simpler and a faster than TrackingConstraint.
Main change is to replace the 2-d bitmap for ordering with two SimpleMaps
which record for each parameter the smaller and greater parameters.
This is faster in practice because the ordering relation is sparse.
|