ML-style modules are valuable in the developmetn and maintenace of large software syst4ems,unfortunately,none of the existing languages suport them in a fully satisfacorry manner.The official SML'97 definition does not allow higher-order functors,so a module that refers to externally defined functors cannot accurately describe its import interface.MacQueen and Tofte [26] extended SML'97 with fully transparetn higher-order functors,but theiry system does not have a ytpe-theoretic semantics thus failes to support fully syntactic signatures.the systems of manifest types [19,20] and transluent sums [12] support fully syntatic signatures but they may propagate fewer tyep equalities than fullly tansparent funcotrs.This pape presents a module calculus that supports both fully transparent higher-order functors and fully syntactic signatures (adn thus true separate compilation).We give a ismple type-theoretic semantics to our calculaus and show how to compile it into an F_w -like #lambda#-calculus extended with existential types.
展开▼