Lecture 4 Notes

5 has type example 3 the program 0

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: © "  ¡¤¡  § ¨ ¡ ¥£¡ ¦¤¢ ¥ £ ©  ¢¢ ¤£ ¡ %  © ¥ ¥ ¡ 56&£ 432¡  §  § £ ¡% ¨ ¢ ¢1 © and value 33, but ' )) 0' $  ¡ © £¤&£  ¡ ¡ $1£ © "  ¡¤¡  § ¨ ¡ ¢¢ ¤£ ¡ ¡ ¥£¡ ¦¤¢ ¥ ¥ £ ©  %  © §  ¡ 56&£ 432¡  § £ ¡% ¨ ¢ ¢1 © has no type, since the body of the program is checked against the interface of without crossing the abstraction boundary. 5 § ¨ £ ©  has type , Example 3. The program )) $ 0' £  ¡ © ¤&£  ¡ ¡ $6 ¡¡ ¡" ¡¤¡  § ¨ ¡ ¥ ¥ £ ©  ¥£¡ ¦¤¢ %  © ¢ ¤¢ has no type. The body of the module must associate each name in the interface with a value of the appropriate type, even if those values are not used elsewhere in the program. Example 4. A module can produce a module value containing more than one binding. For example, the program )) $ 0' $ 1£ © " ¡ ¤¢ ¢ £ ¡ 56&£ 32¡  ¥¦¥ ¡ 56&£ 8¡  ¤...
View Full Document

Ask a homework question - tutors are online