From f600df414d01f44604f47122fe00199842d02baf Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 26 Jun 2014 13:17:55 +0200 Subject: Improved documentation Added explanations where suggested by Adriaan in his review. --- src/dotty/tools/dotc/core/Definitions.scala | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/dotty/tools/dotc/core/Definitions.scala') 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) -- cgit v1.2.3