Changeset 18683 in project


Ignore:
Timestamp:
07/03/10 07:01:33 (10 years ago)
Author:
Ivan Raikov
Message:

additions to static-modules doc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/static-modules

    r18537 r18683  
    122122<procedure>(make-core-typing type-term kind-deftype check-valtype check-kind valtype-match deftype-equiv kind-match deftype-of-path)</procedure>
    123123
     124This procedure creates the structure describing base language
     125type checking. The meaning of the fields is as follows:
     126
     127* {{type-term}}: takes a base language term and an environment, and returns the principal type of the term in the environment
     128* {{kind-deftype}}: {{check-valtype}} {{check-kind}}: check the well-formedness of type and kind expression in an environment; {{kind-deftype}} infers and returns the kind of the given definable type
     129* {{valtype-match}}: {{(valtype-match e t1 t2)}} checks that type {{t1}} is a subtype of {{t2}} in the environment {{e}} (or that {{t1}} can be coerced to {{t2}} in a language with type coercion)
     130* {{deftype-equiv}}: {{(deftype-equiv c k t1 t2)}} checks that the definable types {{t1}} and {{t2}} are equivalent when viewed at kind {{k}}
     131* {{kind-match}}: {{(kind-match e k1 k2)}} checks that the kind {{k1}} is a subkind {{k2}} in the environment {{e}} (or kind equality)
     132* {{deftype-of-path}}: transforms a type path and its kind into its corresponding definable type
     133
    124134
    125135==== Type-checking the module language
     
    128138
    129139
     140This procedure creates the structure describing module language type
     141checking. {{core-syntax}} is an object created by
     142{{make-core-syntax}}, and {{core-typing}} is an object created by
     143{{make-core-typing}}. This procedure returns multiple values with the
     144following meaning:
     145
     146* {{check-modtype}}: checks the well-formedness of a module type
     147* {{check-signature}}: checks the well-formedness of a signature
     148* {{type-modterm}}: infers and returns the type of a module term
     149* {{type-moddef}}: infers and returns the type of a module definition (sequence of definitions)
     150* {{type-definition}}: infers and returns the type of a definition (inside a module or at toplevel)
     151
    130152==== Scoping
    131153
    132154This library implements generic scoping pass for the module language.
    133 This pass is not described in the article.
     155This pass is not described in the paper.
    134156
    135157Scoping is the act of associating identifiers with their binding
     
    143165<procedure>st-empty</procedure>
    144166
    145 <procedure>st-enter-value</procedure>
    146 
    147 <procedure>st-enter-type</procedure>
    148 
    149 <procedure>st-enter-module</procedure>
    150 
    151 <procedure>st-value-path</procedure>
    152 
    153 <procedure>st-type-path</procedure>
    154 
    155 <procedure>st-module-path</procedure>
    156 
    157 <procedure>st-scope-module</procedure>
     167Empty scoping table.
     168
     169<procedure>(st-enter-value ID SC) -> SC</procedure>
     170
     171Enters a value identifier in the given scoping table.
     172
     173<procedure>(st-enter-type ID SC) -> SC</procedure>
     174
     175Enters a type identifier in the given scoping table.
     176
     177<procedure>(st-enter-module ID SC) -> SC</procedure>
     178
     179Enters a module identifier in the given scoping table.
     180
     181<procedure>(st-value-path PATH SC) -> PATH</procedure>
     182
     183<procedure>(st-type-path PATH SC) -> PATH</procedure>
     184
     185<procedure>(st-module-path PATH SC) -> PATH</procedure>
     186
     187<procedure>(st-scope-module PATH SC) -> PATH</procedure>
    158188
    159189==== Evaluation
     190
     191<procedure>(make-mod-eval core-eval enter-val) -> LAMBDA (ENV MODDEF) </procedure>
     192
     193Support for module evaluation.
    160194
    161195=== Version History
Note: See TracChangeset for help on using the changeset viewer.