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
This patch extends the record punning syntax (b01621e) to allow simultaneous label punning and destructuring. Variables bound using as at the top level of a field pattern are treated as labels. For example, it allows you to write
fun { { x ; y } as p; q } -> e
which is equivalent to
fun { p = { x ; y } as p; q } -> e
The text was updated successfully, but these errors were encountered:
Original bug ID: 6312
Reporter: @gasche
Status: closed (set by @mshinwell on 2016-12-07T15:43:04Z)
Resolution: duplicate
Priority: normal
Severity: feature
Version: 4.02.0+dev
Category: ~DO NOT USE (was: OCaml general)
Tags: patch
Monitored by: @yallop
Bug description
Reported by Jeremy Yallop:
#3
A diff is available at:
https://github.com/ocaml/ocaml/pull/3.diff
This patch extends the record punning syntax (b01621e) to allow simultaneous label punning and destructuring. Variables bound using as at the top level of a field pattern are treated as labels. For example, it allows you to write
fun { { x ; y } as p; q } -> e
which is equivalent to
fun { p = { x ; y } as p; q } -> e
The text was updated successfully, but these errors were encountered: