| Anonymous | Login | Signup for a new account | 2013-05-24 15:21 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 | ||||||
| 0004907 | OCaml | OCaml general | public | 2009-11-02 16:24 | 2012-06-01 09:32 | ||||||
| Reporter | mottl | ||||||||||
| Assigned To | garrigue | ||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | ||||||
| Status | assigned | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.11.1 | ||||||||||
| Target Version | Fixed in Version | ||||||||||
| Summary | 0004907: Type manifests do not support type variable substitutions | ||||||||||
| Description | The following would seem like a perfectly legitimate thing to do: type ('a, 'b) t = { a : 'a; b : 'b } type ('a, 'b) u = ('a, 'b option) t = { a : 'a; b : 'b option } Unfortunately, the compiler fails with: File "foo.ml", line 3, characters 5-63: Error: The variant or record definition does not match that of type ('a, 'b option) t This does not quite seem correct. This restriction makes it impossible to e.g. repeat a type definition in a more specialized way such that the preprocessor can exploit the extra syntactic representation to generate code more flexibly from the type definition. | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0005191) doligez (manager) 2009-12-09 17:35 |
The problem is that a record type declaration is generative, so your second record type is not an instance of the first. Can this be changed without major changes to the typechecker? I don't know. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2009-11-02 16:24 | mottl | New Issue | |
| 2009-12-09 17:35 | doligez | Note Added: 0005191 | |
| 2009-12-09 17:35 | doligez | Severity | minor => feature |
| 2009-12-09 17:35 | doligez | Status | new => acknowledged |
| 2012-06-01 09:32 | garrigue | Assigned To | => garrigue |
| 2012-06-01 09:32 | garrigue | Status | acknowledged => assigned |
| Copyright © 2000 - 2011 MantisBT Group |