You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5939 Reporter:@alainfrisch Assigned to:@damiendoligez Status: closed (set by @xavierleroy on 2016-12-07T10:34:20Z) Resolution: fixed Priority: normal Severity: minor Target version: 4.02.0+dev Fixed in version: 4.02.0+dev Category: ~DO NOT USE (was: OCaml general) Related to:#5936
Bug description
I found the following when trying to clean up the Parsetree by putting Pexp_when clauses where they belong in the AST:
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.
The text was updated successfully, but these errors were encountered:
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.
Original bug ID: 5939
Reporter: @alainfrisch
Assigned to: @damiendoligez
Status: closed (set by @xavierleroy on 2016-12-07T10:34:20Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.02.0+dev
Fixed in version: 4.02.0+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #5936
Bug 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;;
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.
The text was updated successfully, but these errors were encountered: