17. A computer system for type-checking an intermediate representation of source code in a compiler comprising: a computer-readable storage medium containing one or more types associated with elements of the intermediate representation, wherein at least one of the types, designated as an unknown type, indicates an element can be of any type; a computer-readable storage medium containing one or more rule sets comprising rules associated with the type, designated as the unknown type, indicating an element can be of any type; and a type-checker module, wherein the type-checker is configured for applying the one or more rule sets to the elements of the intermediate representation, wherein the type-checker module selectively retains type information for some elements of the intermediate representation and selectively does not retain type information for at least one element of the intermediate representation by replacing a known type associated with the at least one element with the type, designated as the unknown type, indicating the at least one element can be of any type, wherein the type-checker is configured to apply the one or more rule sets after the replacing the known type with the unknown type.
17. A computer system for type-checking an intermediate representation of source code in a compiler comprising: a computer-readable storage medium containing one or more types associated with elements of the intermediate representation, wherein at least one of the types, designated as an unknown type, indicates an element can be of any type; a computer-readable storage medium containing one or more rule sets comprising rules associated with the type, designated as the unknown type, indicating an element can be of any type; and a type-checker module, wherein the type-checker is configured for applying the one or more rule sets to the elements of the intermediate representation, wherein the type-checker module selectively retains type information for some elements of the intermediate representation and selectively does not retain type information for at least one element of the intermediate representation by replacing a known type associated with the at least one element with the type, designated as the unknown type, indicating the at least one element can be of any type, wherein the type-checker is configured to apply the one or more rule sets after the replacing the known type with the unknown type. 21. The system of claim 17 wherein the one or more rule sets applied to the elements of the intermediate representation are selected based on a characteristic of the source code.