Lecture 4 Notes

We would like to be able to check statically whether

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 a module procedure. We would like to be able to check statically whether our programs respect their abstraction boundaries. We therefore emphasize the types of our example programs, since their values are straightforward to compute. As we have seen before, understanding the scoping and binding rules of the language will be the key to both analyzing and evaluating programs in the language. 3 7.2 The Basic Module System Example 1. The program ' % $ )1)0(¥  ¡ © ¤&£  ¡ ¡  © £ $ £ © "#¥ !¡¤¡ £ ©   § ¨ ¡ ¦¤¢ ¥£¡ ¥ ¡ 6&£ 432¡  5 §  § £ ¡% ¨ ¢ ¢1 © £ ©  and value 33. has type The first three lines are a definition of a module named . It has an interface and a implementation . We say that is declared in the interface and defined in the module implementation. Alternatively, we say that the module exports a value for . ¥ $" £ © #¥ )) ' $ 7(¥ ¥ § ¨ § ¨ The last two lines constitute the program body, which imports the module and evaluat...
View Full Document

Ask a homework question - tutors are online