Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
change 12-tuples in typing/typeclass.mli into records for readability #7237
Original bug ID: 7237
The very large tuples in the typeclass.mli interface (this code type-checks class declarations in particular)
could be turned into records with named fields to make code manipulating them more readable.
A good way to get started would be to look at the variable names used in the implementation, for example check_coercions in
Comment author: junsli
I noticed the typedtree.ml has class_description and class_type_declaration being defined as the same thing. git blame doesn't show useful historical reason for this.
and class_description =
and class_type_declaration =
12-tuple in typeclass.mli uses both of them.
Comment author: @gasche
These two notions correspond to distinct source syntaxes (see below), but at the typing stage they carry the exact same information. The distinction between both is not very useful, but it has a meaning: to test which one to use, you should think of which of the two concrete language constructions is being manipulated.
| Psig_class of class_description list