legacy-svn-scala/docs/TODO

92 lines
3.3 KiB
Plaintext

//###########################################################-*-outline-*-####
// TODO list
//############################################################################
// $Id$
* Histories
Requires: -
Create a class "History<X>" that can be used to store a phase
dependent value of type "X". We can then have TypeHistories,
FlagHistories, ClosureHistories, ...
Currently only symbols may contain phase dependent values. For that
reason we sometimes create symbols just because we need a phase
dependent type (for example the thisTypeSym). And sometimes we don't
have phase dependent values where we should (for example lobound in
AbsTypeSymbol or flags in Symbol)
Once we have histories, it is possible to add one or several
phase-dependent values to every symbol (and also to other data
types).
The two base operations of class "History" are "getValueAt(Phase)"
and "setValueAt(Phase)". There are two kinds of histories: those
that may only return values already set and those that trigger the
evaluation of values not yet set (=> lazy types).
* Remove the notion of primary constructor.
Requires: Histories
In case of abstract types and type aliases, the sole purpose of the
primary constructor is to store the type parameters. These type
parameters can be stored in a type parameters history.
In case of class types, the primary constructor stores the type and
value parameters of the class and it defines a valid instance
constructor. As for abstract types and type aliases, the type and
value parameters can be stored in parameters histories and the
instance constructor defined be the primary constructor can be
replaced by a normal constructor.
* Remove symbols from MethodTypes and PolyTypes
Requires: Histories, Primary constructor removal
The symbols of the value parameters of methods are currently stored
in their type in "MethodType" types. These symbols can be stored in
a new parameters history of class "TermSymbol". The array of symbols
in the "MethodType" type can then be replaced by an array of types.
The process is about the same for symbols in PolyTypes. The main
difference is that type parameters may be referenced and thus we
need something like De Bruijn indicies to represent these
references.
* Scopes with history
Requires: -
Implement scopes that maintain a validity phase interval for each of
its member. Members may then only be added to scopes. Removing is
replaced by terminating the validity interval.
* Implement a type IntervalType(Type,Type)
Requires: -
A type IntervalType(Type,Type) specifies an upper and a lower
bound. This type can be used to replace the loBound field in class
AbsTypeSymbol. It makes it possible to merge classes TypeAliasSymbol
and AbsTypeSymbol into one single class whose info is either a
TypeRef for type aliases or an IntervalType for abstract types.
* Solve refinement problem.
Requires: Histories, Scopes with history, IntervalTypes
Replace the current type CompoundType(Type[],Scope) by the new types
CompoundType(Type[]) and RefinementType(Type,Map<Symbol,Type>) and
add a Scope field in class ClassSymbol.
Replace the symbol in compound types by a closure history.
//############################################################################