| Anonymous | Login | Signup for a new account | 2013-05-20 08:51 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 | |||||||
| 0005386 | OCaml | OCaml general | public | 2011-10-26 02:11 | 2011-12-20 09:07 | |||||||
| Reporter | sweeks | |||||||||||
| Assigned To | ||||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | |||||||
| Status | resolved | Resolution | won't fix | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | 3.12.1 | |||||||||||
| Target Version | Fixed in Version | |||||||||||
| Summary | 0005386: allow expression-level module open in field-assignment syntax | |||||||||||
| Description | Given the following module declaration: module M = struct type t = { foo : int } let t = { foo = 13 } end The following expression is accepted: let _ = M.(t.foo) but the following is syntactically invalid: let () = M.(t.foo) <- 13; It would be nice if it were accepted. | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0006185) garrigue (manager) 2011-10-26 03:56 |
What is wrong with M.(t.foo <- 13) ? Are you concerned by putting the whole expression into scope? I really think we need a warning for local open hiding local identifiers... IIRC, Jun already has some code to do that, it would be a good idea to include it. |
|
(0006186) sweeks (reporter) 2011-10-26 04:14 |
Yes, I prefer to restrict the scope of the open as much as possible. |
|
(0006395) xleroy (administrator) 2011-12-20 09:07 |
OCaml has no notion of l-value expressions: "a.lbl <- b" is an AST node carrying "a" and "b" as subexpressions and "lbl" as node annotation. For this reason, a local open that would scope over "a" and "lbl" but not "b" simply doesn't fit the model and would need a special AST node + a special typing rule. It's not worth it, and I move to close this PR. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-10-26 02:11 | sweeks | New Issue | |
| 2011-10-26 03:56 | garrigue | Note Added: 0006185 | |
| 2011-10-26 04:14 | sweeks | Note Added: 0006186 | |
| 2011-12-20 09:07 | xleroy | Note Added: 0006395 | |
| 2011-12-20 09:07 | xleroy | Severity | minor => feature |
| 2011-12-20 09:07 | xleroy | Status | new => resolved |
| 2011-12-20 09:07 | xleroy | Resolution | open => won't fix |
| Copyright © 2000 - 2011 MantisBT Group |