Lecture 4 Notes

and 5 6 5

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: ©£¢ ¡©¡¡¢¡ § ¢ ¢ § ¨¡   ¢ ££ £  ¡ ¢¥¡ £ £¤ ¡ ¦ £    ¢ ££ £  ¡ ¢¥¡ £ £¤ £ £¤  ¡ ¢¥¡ £ £  ¡ ¢¥¡ £ £¤ ¢ £ 1 ¡ £ ©% £ ¢ ¡ © ¡ £  ¡¢ ¡¢ ¢ ¡¢ ¡ ¢¡ ¢ ¡¢ ¢ © £ ¢ ££ ¡ ¢ ¡ ¦ £  ¡ £ § As we did in the previous checker, we will construct a global type environment in which each module is bound to its type. 39 Next, we introduce a systematic way of handling abstract types and type abbbreviations. We have said that an abstract type behaves like a primitive type, such as or . Type abbreviations, on the other hand, are transparent: they behave exactly like their expansions. So every type is equivalent to one that is given by the grammar Type :: Type :: Type :: t1 Type :: Type Type Type :: m t2 ¡¡ ¢ £ ©  ¡ 1¡ £ ©  § ¡ 6&£ 5 ¢ £ ¢ ¡  8¡  where t1 is bound as an abstract type in the current type environment, or where t 2 is declared as an abstract type in m. We call a type of this form an expanded type. ¡ ¡£ ¡  ¡  £ ¢ © ¢ ¡ % £ ¢ £   % ¥¡ © ¤  We write a procedur...
View Full Document

Ask a homework question - tutors are online