| Anonymous | Login | Signup for a new account | 2013-05-19 04:07 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005067 | OCaml | OCamldoc | public | 2010-06-05 15:45 | 2012-09-20 16:24 | ||||||
| Reporter | bluestorm | ||||||||||
| Assigned To | guesdon | ||||||||||
| Priority | normal | Severity | minor | Reproducibility | N/A | ||||||
| Status | assigned | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | |||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | |||||||||
| Summary | 0005067: ocamldoc doesn't preserve type contraints and `_`, producing unreadable interfaces | ||||||||||
| Description | Ocamldoc doesn't preserve type constaints (type .. = ... constraint ..) and type placeholders in values (val foo : .. -> _) : they are resolved during type inference, and ocamldoc gives back the fully detailed types wich are sometimes unreadable. It would be very nice to have an option to reuse the type information present in the .mli without additional inference. | ||||||||||
| Additional Information | In [Macaque], I use a lot of phantom types carrying multiple type informations : I use object types as a type-level record, wich leads to quite heavy datatypes. I use the "constraint" feature and "_" for values specifications to have a readable [interface]. For example : type 'phant binary_op = 'a t -> 'b t -> 'c t constraint 'a = < t : 'in_t; nul : 'n; .. > constraint 'b = < t : 'in_t; nul : 'n; .. > constraint 'c = < t : 'out_t; nul : 'n > constraint 'phant = < in_t : 'in_t; out_t : 'out_t; nul : 'n; a : 'a; b : 'b > type 'phant arith_op = 'phant binary_op constraint 'phant = < in_t : #numeric_t as 't; out_t : 't; .. > val (+) : _ arith_op val (-) : _ arith_op val (/) : _ arith_op val ( * ) : _ arith_op My problem is that ocamldoc produces utterly unreadable results : type < a : < nul : 'a; t : 'b; .. >; b : < nul : 'a; t : 'b; .. >; in_t : 'b; nul : 'a; out_t : 'c > binary_op = (< nul : 'a; t : 'b; .. > as 'd) t -> (< nul : 'a; t : 'b; .. > as 'e) t -> < nul : 'a; t : 'c > t type < a : < nul : 'a; t : #Sql.numeric_t as 'b; .. >; b : < nul : 'a; t : 'b; .. >; in_t : 'b; nul : 'a; out_t : 'b > arith_op = < a : < nul : 'a; t : 'b; .. > as 'c; b : < nul : 'a; t : 'b; .. > as 'd; in_t : 'b; nul : 'a; out_t : 'b > Sql.binary_op val (+) : < a : < nul : 'a; t : #Sql.numeric_t as 'b; .. >; b : < nul : 'a; t : 'b; .. >; in_t : 'b; nul : 'a; out_t : 'b > arith_op [Macaque] http://macaque.forge.ocamlcore.org/ [^] [interface] http://darcs.ocamlcore.org/cgi-bin/darcsweb.cgi?r=macaque;a=plainblob;f=/src/sql.mli [^] | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Relationships |
||||||
|
||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-06-05 15:45 | bluestorm | New Issue | |
| 2010-06-05 15:45 | bluestorm | Status | new => assigned |
| 2010-06-05 15:45 | bluestorm | Assigned To | => guesdon |
| 2012-07-10 20:21 | doligez | Target Version | => 4.01.0+dev |
| 2012-07-31 13:36 | doligez | Target Version | 4.01.0+dev => 4.00.1+dev |
| 2012-09-18 13:22 | doligez | Target Version | 4.00.1+dev => 4.01.0+dev |
| 2012-09-20 16:24 | doligez | Relationship added | related to 0005294 |
| Copyright © 2000 - 2011 MantisBT Group |