| Anonymous | Login | Signup for a new account | 2013-05-23 04:24 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 | |||
| 0005450 | OCaml | OCaml general | public | 2011-12-23 17:16 | 2011-12-27 10:01 | |||
| Reporter | pilki | |||||||
| Assigned To | garrigue | |||||||
| Priority | none | Severity | feature | Reproducibility | N/A | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | 3.13.0+dev | ||||||
| Summary | 0005450: The name of types introduced by (type foo) are not used for the inferred type variables | |||||||
| Description | If you write <<< let f (x:'foo) = x >>> the inferred type is val f : 'foo -> 'foo but if you write <<< let g (type bar) (x:bar) = x >>> you end up with val g : 'a -> 'a instead of val g : 'bar -> 'bar | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0006531) garrigue (manager) 2011-12-24 02:39 |
As mentioned in PR#5445, this is a consequence of dropping variable names upon instantiation. We probably need to do something in this case, as we clearly want to keep those explicit names, at least in the current function definition. |
|
(0006541) garrigue (manager) 2011-12-27 10:01 |
Fixed in revision 11958. Note that this also solves the same problem for explicit polymorphism: # let id : 't. 't -> 't = fun x -> x;; val id : 't -> 't = <fun> # let id : type foo. foo -> foo = fun x -> x;; val id : 'foo -> 'foo = <fun> Potential glitch (but not new): # let magic : type t t'. t -> t' = Obj.magic;; val magic : 't -> 't' = <fun> |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-12-23 17:16 | pilki | New Issue | |
| 2011-12-23 17:26 | protz | Relationship added | child of 0005444 |
| 2011-12-24 02:39 | garrigue | Note Added: 0006531 | |
| 2011-12-24 02:39 | garrigue | Assigned To | => garrigue |
| 2011-12-24 02:39 | garrigue | Status | new => acknowledged |
| 2011-12-27 10:01 | garrigue | Note Added: 0006541 | |
| 2011-12-27 10:01 | garrigue | Status | acknowledged => closed |
| 2011-12-27 10:01 | garrigue | Resolution | open => fixed |
| 2011-12-27 10:01 | garrigue | Fixed in Version | => 3.13.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |