| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
|/ |
|
|
|
|
|
|
| |
Since And/Or type themselves are parameterless, their
the union and intersection of hgiher-kinded types has to be treated
specially: The types have to be pulled under a common lambda.
|
| |
|
|
|
|
|
|
| |
Previously adaptIfHK was performed on every type application. This made
t3152 fail. We now do this only on demand, in isSubType. t3152 now passes
again. But the change unmasked another error, which makes Iter2 fail to compile.
|
|
|
|
| |
Fixes problem raised in #966.
|
|
|
|
|
| |
As remarked by @smarter, argInfos does not work for type lambdas,
so argBoundss is always Nil.
|
| |
|
| |
|
|
|
|
|
|
| |
All Lambda abstractions, not just eta expansions, should
use actual parameter bounds, not the one retrieved from
the parameter symbols.
|
| |
|
| |
|
|
|
|
| |
Makes i815 compile.
|
|
|
|
| |
Taking typeAlias is illegal in that case.
|
|
|
|
|
|
| |
Arg bounds do not count is bindings.
Also: TypeLambda's $Apply binding should be covariant,
because the parameter is (not sure it matters though).
|
|
|
|
| |
Arg bounds do not count is bindings.
|
|
|
|
| |
Printing bounds omits the "<:" otherwise.
|
|
|
|
| |
typeSymbols always have empty type parameter list.
|
|
|
|
|
| |
Also: fix EtaExpansion.
Also: Add some debug code to Applications, awaiting further fixes.
|
|
|
|
| |
Also: fix adaptArgs and LambdaTrait to make it work.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Done in order to keep the basics as simple as possible.
Treating existentially bound parameters as still instantiatable type
parameters does not seem to add anything fundamental, and makes the
type system less regular.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
It turns out it's not needed because now all type arguments are
expressed as aliases. Interestingly dropping this feature shaved
20% off the time off junit tests. Which seems to indicate that the
handling of type application is really performance critical.
|
|
|
|
|
|
|
| |
When eta expanding a type `C` to `[vX] => C[X]` the variance `v`
is now the variance of the expected type, not the variance of the
type constructor `C`, as long as the variance of the expected type
is compatible with the variance of `C`.
|
|
|
|
|
|
| |
TypeRef becomes Type, thus removing duplicates. Where
...Type was used in an extraction (e.g. ArrayType(...),
FunctionType(...)), we now use ...Of.
|
| |
|
| |
|
|
|
|
|
| |
Some subtype tests should not instantiate type variables, in particular
those having to do with & and |.
|
|
|
|
| |
Fixes suggested by @marter when reviewing previous hk PR.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that asSeenFrom can produce types
that get projected with $apply but that are not
higher-kinded. An exampple failure is in Iter3,
andother in scala.collection.immutable.Map (which is
now part of the test suite).
We now detect that situation, and eta expand the
projected type in `derivedSelect`, this will
force a subssequent `lookupRefined` which will give
the desired normalized type.
Also added is a configurable test that checks that
$apply projected tyeps are in fact higher-kinded.
|
|
|
|
|
|
| |
1) Lambda abstract now records bounds of abstracted type parameters in TypeLambda
2) Eta-reduce likewise keeps the bounds it finds in the TypeLambda
3) Eta-reduce now also translates hk$i references to type parameters of the reduced type.
|
|
|
|
|
|
|
|
|
|
| |
Now also allows to reduce something like
([T] => Map[T, String])
to
Map[_, String]
|
|
|
|
|
| |
Accidentally forwarded to rawTypeParams. This solved the problem with mismatching
type params in appliedTo that was caught in testLifted.
|
| |
|
|
|
|
|
| |
Replace occurrences of isLambda with isHK, because isHK is
a bit faster and simplier.
|
|
|
|
|
|
|
|
| |
These are not user-accessible types, so no need to follow
type convention and write in upper case.
Also, rename occurrences of lambda to Lambda, to make clear
we mean a type lambda.
|
|
|
|
| |
by removing dead case.
|
|
|
|
| |
Want to have a unique name for Apply, so that tests for higher-kinded types become cheaper.
|
|
|
|
|
|
| |
Used to be just instantiated lambdas. With the new scheme
every type with a kind higher than * needs to be projected
with #Apply.
|
|
|
|
|
|
|
|
| |
Rewrite a type application like
([HK$0] => C[HK$0])(T) to C[T]
Avoids application cahins to become unnecessarly large.
|
|
|
|
| |
This aligns typeParams and rawTypeParams. It's not strictly to necessary, though.
|
|
|
|
|
|
|
|
| |
Discrepancies between numbers of formal and actual type arguments were
observed when typing partialFunctions.scala under new scheme.
Should come back to this when subtyping is rewrittem/simplified to
work with new hk-scheme. Maybe testLifted is no longer needed at all.
|
|
|
|
|
| |
Needed to avoid cycles involving F-boundes hk-types when reading Scala2 collection classes
with new hk-scheme.
|
|
|
|
|
| |
parameterizeWith picked between simple hk types and lambda abstraction.
No longer needed because now we always lambda abstract.
|