diff options
author | Martin Odersky <odersky@gmail.com> | 2014-06-26 13:17:55 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-06-26 13:17:55 +0200 |
commit | f600df414d01f44604f47122fe00199842d02baf (patch) | |
tree | 2086922b50dc3d92aa5aa5170d6e0162726f395d /src/dotty/tools/dotc/core/Definitions.scala | |
parent | f823e422478232aa083f3510fa8ce4914ec99d53 (diff) | |
download | dotty-f600df414d01f44604f47122fe00199842d02baf.tar.gz dotty-f600df414d01f44604f47122fe00199842d02baf.tar.bz2 dotty-f600df414d01f44604f47122fe00199842d02baf.zip |
Improved documentation
Added explanations where suggested by Adriaan in his review.
Diffstat (limited to 'src/dotty/tools/dotc/core/Definitions.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Definitions.scala | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala index 6a318b0fe..5e335e240 100644 --- a/src/dotty/tools/dotc/core/Definitions.scala +++ b/src/dotty/tools/dotc/core/Definitions.scala @@ -437,13 +437,18 @@ class Definitions { * to be the type parameters of a higher-kided type). This is a class symbol that * would be generated by the following schema. * - * class LambdaXYZ { type v_1 Arg1; ...; type v_N ArgN; type Apply } + * class LambdaXYZ extends Object with P1 with ... with Pn { + * type v_1 $hk$Arg0; ...; type v_N $hk$ArgN; + * type Apply + * } * * Here: * - * - XYZ is a string of length N with one letter for each variant of a bound symbols, - * using `P` (positive variance), `N` (negative variance), `I` (invariant). * - v_i are the variances of the bound symbols (i.e. +, -, or empty). + * - XYZ is a string of length N with one letter for each variant of a bound symbol, + * using `P` (positive variance), `N` (negative variance), `I` (invariant). + * - for each positive or negative variance v_i there is a parent trait Pj which + * is the same as LambdaXYZ except that it has `I` in i-th position. */ def lambdaTrait(vcs: List[Int]): ClassSymbol = { assert(vcs.nonEmpty) |