Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007237OCaml~DO NOT USE (was: OCaml general)public2016-04-21 00:142017-09-24 17:32
Reportergasche 
Assigned Togasche 
PrioritylowSeveritytweakReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version4.03.1+dev 
Target Version4.03.1+devFixed in Version4.04.0 +dev / +beta1 / +beta2 
Summary0007237: change 12-tuples in typing/typeclass.mli into records for readability
DescriptionThe very large tuples in the typeclass.mli interface (this code type-checks class declarations in particular)

  https://github.com/ocaml/ocaml/blob/5401ce8/typing/typeclass.mli [^]

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

  https://github.com/ocaml/ocaml/blob/5401ce8/typing/typeclass.ml#L1592-L1593 [^]
Tagsjunior_job
Attached Files

- Relationships

-  Notes
(0015869)
junsli (reporter)
2016-04-27 04:04

Aside:

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 =
  class_type class_infos

and class_type_declaration =
  class_type class_infos

12-tuple in typeclass.mli uses both of them.
(0015870)
gasche (administrator)
2016-04-27 04:52
edited on: 2016-04-27 12:48

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.

In parsing/parsetree.mli:

  | Psig_class of class_description list
        (* class c1 : ... and ... and cn : ... *)
  | Psig_class_type of class_type_declaration list
        (* class type ct1 = ... and ... and ctn = ... *)

(0015871)
junsli (reporter)
2016-04-27 09:12

Thanks. That makes sense now. I actually appreciate this deliberate duplicate.
(0015886)
junsli (reporter)
2016-04-30 04:29

See GPR#570
(0015887)
gasche (administrator)
2016-04-30 17:09

( https://github.com/ocaml/ocaml/pull/570 [^] )
(0015919)
gasche (administrator)
2016-05-11 19:40

GPR#570 was merged in trunk, so this problem is solved by junsli's patch. Thanks!

- Issue History
Date Modified Username Field Change
2016-04-21 00:14 gasche New Issue
2016-04-21 00:15 gasche Status new => acknowledged
2016-04-21 00:15 gasche Tag Attached: junior_job
2016-04-21 00:16 gasche Description Updated View Revisions
2016-04-21 10:45 doligez Target Version => 4.03.1+dev
2016-04-27 04:04 junsli Note Added: 0015869
2016-04-27 04:52 gasche Note Added: 0015870
2016-04-27 09:12 junsli Note Added: 0015871
2016-04-27 12:48 gasche Note Edited: 0015870 View Revisions
2016-04-30 04:29 junsli Note Added: 0015886
2016-04-30 17:09 gasche Note Added: 0015887
2016-05-11 19:40 gasche Note Added: 0015919
2016-05-11 19:40 gasche Status acknowledged => resolved
2016-05-11 19:40 gasche Fixed in Version => 4.04.0 +dev / +beta1 / +beta2
2016-05-11 19:40 gasche Resolution open => fixed
2016-05-11 19:40 gasche Assigned To => gasche
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)
2017-09-24 17:32 xleroy Status resolved => closed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker