| Anonymous | Login | Signup for a new account | 2013-05-21 00:23 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 | ||||||
| 0005939 | OCaml | OCaml general | public | 2013-03-06 18:56 | 2013-04-29 16:34 | ||||||
| Reporter | frisch | ||||||||||
| Assigned To | doligez | ||||||||||
| Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||
| Status | confirmed | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | |||||||||||
| Target Version | 4.02.0+dev | Fixed in Version | |||||||||
| Summary | 0005939: "fun (type t) when cond -> ..." should be rejected, maybe also "fun p when cond -> ..." | ||||||||||
| Description | I found the following when trying to clean up the Parsetree by putting Pexp_when clauses where they belong in the AST: # fun (type t) when false -> 0;; >> Fatal error: exit(0) outside appropriated catch Fatal error: exception Misc.Fatal_error The fix is not difficult (either in the parser or in the type-checker). But I'm wondering whether it make sense to keep the syntax: fun pat when cond -> ... which necessarily triggers warning 25 (bad style, all clauses in this pattern-matching are guarded). The Parsetree cleanup would be a little bit simpler if we got rid of this form as well. I doubt anyone uses it. I propose to get rid of it, after (i) asking on the caml-list if anyone objects; (ii) using OPAM to check that the construction is indeed not used in any of the packaged software. | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0009085) frisch (developer) 2013-04-12 13:51 |
0005936 seems to confirm that "fun pat when cond -> expr" can be removed with no harm. |
|
(0009113) frisch (developer) 2013-04-15 18:24 |
Commit 13528 on branch extension_points introduces an explicit representation of "cases" with an optional guard in order to get rid of the ugly Pexp_when. It also remove support for the construction "fun pat when cond -> expr". So, please don't remove it from the trunk, this will be part of the merge of extension_points. |
|
(0009226) frisch (developer) 2013-04-29 16:34 |
Setting Target Version = 4.02 (already fixed in extension_points, which will hopefully be merged in time for 4.02). |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2013-03-06 18:56 | frisch | New Issue | |
| 2013-03-07 15:50 | doligez | Status | new => confirmed |
| 2013-04-12 13:49 | frisch | Relationship added | related to 0005936 |
| 2013-04-12 13:51 | frisch | Note Added: 0009085 | |
| 2013-04-15 18:24 | frisch | Note Added: 0009113 | |
| 2013-04-25 17:05 | doligez | Assigned To | => doligez |
| 2013-04-25 17:05 | doligez | Status | confirmed => assigned |
| 2013-04-25 17:06 | doligez | Status | assigned => confirmed |
| 2013-04-29 16:34 | frisch | Note Added: 0009226 | |
| 2013-04-29 16:34 | frisch | Target Version | => 4.02.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |