31 


32 
Primary tycons need to be translated to the corresponding plambda type variable in the TransTypes (in toTyc). 
Primary tycons need to be translated to the corresponding plambda type variable in the TransTypes (in toTyc). 
33 


34 
Currently tycpaths (FLINT/trans/typestp.sml) are used as an intermediate form in the translation from (frontend) types to plambda types. It is likely that this intermediate representation can be eliminated. 
Currently tycpaths (FLINT/trans/tycpath.sml) are used as an intermediate form in the translation from (frontend) types to plambda types. It is likely that this intermediate representation can be eliminated. 
35 


36 
The tycpath for a tycon is either just the tycon itself (TP_TYC tyc), or a representation of a plambda type variable, TP_VAR{tdepth,num,kind}. Compound tycpaths (TP_FCT, TP_APP, 
The tycpath for a tycon is either just the tycon itself (TP_TYC tyc), or a representation of a plambda type variable, TP_VAR{tdepth,num,kind}. Compound tycpaths (TP_FCT, TP_APP, 
37 
and TP_SEL) have to do with functors and structures. 
and TP_SEL) have to do with functors and structures. 
38 


39 

[Q: What is the role of TP_TYC? Shouldn't all primary tycons be represented by a TP_VAR? 
40 

If so, are the arguments of TP_TYC secondary tycons? In that case, what do they have to 
41 

do with the plambda type or kind?] 
42 


43 
 
 
44 
Determining the tkind (plambda kind) of a functor element. 
Determining the tkind (plambda kind) of a functor element. 
46 
A functor element in a signature is translated into a type function and also into a lambda term. The type function has a kind (tkind), which must be computable from the functor signature. 
A functor element in a signature is translated into a type function and also into a lambda term. The type function has a kind (tkind), which must be computable from the functor signature. 
47 


48 
PLambda kinds have the following forms: 
PLambda kinds have the following forms: 
49 
fun K ... K > K 

50 
seq K ... K 
fun K ... K > K  an nary type operator 
51 
0 ... n 
seq K ... K  an ntuple of type constructors 
52 

0 ... n  a basic tycon of arity k 
53 


54 
 
 
55 
External functors and primary types in closures 
External functors and primary types in closures 
56 


57 
Because pidinfo in persistent maps contain lty information for the given pid, the lty for externally referenced functor (i.e., an occurrence of a functor name that is defined outside the compilation unit), the FLINT lty must be computed. The lty does not have to be computed before elaboration of the functor variable for local functor variables because we do not create persistent map entries for those. 
Because pidinfo in persistent maps contain lty information for the given pid, the lty for externally referenced functor (i.e., an occurrence of a functor name that is defined outside the compilation unit), the FLINT lty must be computed. The lty does not have to be computed before elaboration of the functor variable for local functor variables because we do not create persistent map entries for those. 
58 

[Q: What is a pidinfo, and where is it defined?] 
59 

[Q: Where in the code is the lty for an external functor computed?] 
60 


61 
We translate externally defined functor variables by looking up the path until we get to an EXTERN access. Then we compute the lty for that functor variable given that functor and compInfo. 
We translate externally defined functor variables by looking up the path until we get to an EXTERN access. Then we compute the lty for that functor variable given that functor and compInfo. 
62 

[Q: How? What does compinfo have to do with this?] 