Lecture 4 Notes

If is empty then it makes no demands on so the answer

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: of . So we check a program in our language much as we checked a : first we assemble the declared types of each module, then we check each module against its declared type, and last we find the type of the program body.  £¡ &¡ 1¤¢ If we think of each module as producing a data type, then the declared types are the interface of each module, and the body of the module is the implementation of that interface. The interfaces are public, but the implementations are private. When we check any piece of code, we check it only against the public data: the interfaces. When checking the code of a module, we do not look at the implementation of any other module. When checking the body of the program, we do not look at the implementation of any module at all. As we did with the interpreter, our first step is to allow module bindings in the type environment. ¢£  ¡  ¡  © ¡  ¡ ¢ ¡ % £ © §§§ ¡  ¡ ¢ ¡ % £ © £¡ ¡© £¡ ¡© ¡ ¡%©£ ¡£ £ ¥£ ¡ % £ ¡ ¤¡ ¡ % © § ¡ ¡¦ ¡ © £ £ ¡ ¥¤¡ ¥¦£ © ¤  ¡ £ 999 ¡...
View Full Document

Ask a homework question - tutors are online