| Anonymous | Login | Signup for a new account | 2013-06-19 00:03 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 | |||||||
| 0005155 | OCaml | OCaml general | public | 2010-09-26 21:53 | 2012-09-19 14:13 | |||||||
| Reporter | yziquel | |||||||||||
| Assigned To | garrigue | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||||||
| Status | resolved | Resolution | suspended | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | 3.12.0 | |||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | ||||||||||
| Summary | 0005155: Toplevel doesn't accept the type info it writes itself. | |||||||||||
| Description | Here's a type declaration that is accepted. However the type information that is returned isn't accepted by the toplevel. yziquel@seldon:~$ ocaml Objective Caml version 3.12.0 # type 'a t = private ( < .. > as 'a);; type 'a t = private < .. > constraint 'a = 'a t # type 'a t = private < .. > constraint 'a = 'a t;; Error: The type constraints are not consistent. Type 'a is not compatible with type 'a t # | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0005668) garrigue (manager) 2010-10-02 11:31 |
I admit the situation is confusing. However, I have no easy fix at this point. Parsing of type expressions is so complicated that fixing this is bound to break something else... Two remarks: 1) I'm afraid this definition is not what you intended. It defines a private row type, whose parameter is constrained to be itself. This is not a private abbreviation, and actually this type ends up not being usable. 2) If you want a private abbreviation, the declaration should be type 'a t = 'a constraint 'a = < .. > This version gets printed correctly. |
|
(0005670) yziquel (reporter) 2010-10-03 21:21 |
Thanks. I believe that type 'a t = 'a constraint 'a = < .. > is indeed what I want. Couldn't it be possible to make the toplevel print this type declaration instead of the following? type 'a t = < .. > constraint 'a t = 'a It seems to me that the main issue is the fact that 'a is implicit in < .. >. Wouldn't it be better to have a way to make it explicit? Like < .. as 'a >? |
|
(0008112) doligez (manager) 2012-09-19 14:13 |
This type definition is not accepted anymore in 4.00.0, so the problem disappeared. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-09-26 21:53 | yziquel | New Issue | |
| 2010-10-02 11:18 | garrigue | Status | new => assigned |
| 2010-10-02 11:18 | garrigue | Assigned To | => garrigue |
| 2010-10-02 11:31 | garrigue | Note Added: 0005668 | |
| 2010-10-03 21:21 | yziquel | Note Added: 0005670 | |
| 2012-07-10 17:48 | 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-19 14:11 | doligez | Target Version | 4.00.1+dev => 4.01.0+dev |
| 2012-09-19 14:13 | doligez | Note Added: 0008112 | |
| 2012-09-19 14:13 | doligez | Status | assigned => resolved |
| 2012-09-19 14:13 | doligez | Resolution | open => suspended |
| Copyright © 2000 - 2011 MantisBT Group |