-
Notifications
You must be signed in to change notification settings - Fork 78
Description
There needs to be a representation of bounds information in function types. Currently the bounds information is not being included in function types. This is problematic because in clang, typedefs are represent as names that map to type object. Uses of typedef'ed names refer to those function objects. It is also problematic for typechecking pointers to function types.
One approach is to use DeBruijn indices: number all the arguments and then change bounds expressions used in types to refer to those arguments. We would need a way to represent uses of those arguments in bounds expressions. For now, we could require that two bounds expressions be exactly identical after this transformation. Later on, we could canonicalize bounds expressions and require that they have the same canonical representation. Even later on, we might check to see if one bounds expression implies another.