Previous Up Next

10  Types

As the name implies, the module contains the definition of types of the language, basically a long ocaml-type declaration. The intended use is in most cases derivable from the name of the corresponding constructor.

[Status of the comments here] Does the part here is consistent with the actual implementation?

To do:
Appel uses a type unique (p.112). It is used for type checking of records, which in not structural but by identity. What do we have?

What is the difference between Types.UNIT and Types.NIL? A difference to [App98b] is that the type unique is missing (and this has also consequences for record and array types). Furthermore I have a type UNDEF. And the type NAME has no a reference here. Appel uses the type VOID instead of UNIT in [App98a].

Also I included the type errors into the module, and also the type s and pos are not featured in Appel.

Unlike [App98b], I support a boolean type.

[Old version] What did the function compatible_types do? Is it compatible with what is needed in [App98b]?

No, especially for record types, the function checks for structural equality, which is not what is required for Tiger.
Previous Up Next