Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006312OCamlOCaml generalpublic2014-01-31 08:392014-07-16 15:08
Reportergasche 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version4.02.0+dev 
Target VersionFixed in Version 
Summary0006312: [github patch] extend record punning to allow destructuring: desugar pattern {{x;y} as p} into {p = {x;y} as p}
DescriptionReported by Jeremy Yallop:
  https://github.com/ocaml/ocaml/pull/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

Tagspatch
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-01-31 08:39 gasche New Issue
2014-02-19 20:13 doligez Tag Attached: patch
2014-07-16 15:08 doligez Status new => acknowledged


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker