Skip to content

Commit df95744

Browse files
authored
[patterns] Remove some of the less baked parts of the proposal. (#2230)
* [patterns] Remove some of the less baked parts of the proposal. - Get rid of declaration matcher patterns. They're syntactic sugar (on top of syntactic sugar) and seem to be confusing and error-prone. Taking them out at least for now to simplify. - Get rid of the Destructure_n_ interface. I'd eventually like some protocol for user-defined positional destructuring, but it doesn't seem like this is it. Removing the latter left some loose ends in record patterns around typing and inference. I've tried to tie those up in a way that makes sense. * Revise.
1 parent f6171a5 commit df95744

File tree

3 files changed

+114
-195
lines changed

3 files changed

+114
-195
lines changed

working/0546-patterns/exhaustiveness.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,10 @@ into spaces:
367367
368368
* **Static type:** An extract space with that type and no fields.
369369
370-
* **Record pattern:** If it has positional fields, then an extract space
371-
whose type is the corresponding `Destructure_n` type. Otherwise, an extract
372-
space with type "top". Then lift the record fields to spaces on the extract
373-
space. Since extract spaces only have named fields, lift positional fields
374-
to implicit names like `field0`, `field1`, etc.
370+
* **Record pattern:** An extract space with type "top". Then lift the record
371+
fields to spaces on the extract space. Since extract spaces only have named
372+
fields, lift positional fields to implicit names like `field0`, `field1`,
373+
etc.
375374
376375
* **List pattern:** An extract space whose type is the corresponding list
377376
type. Element subpatterns lift to fields on the extract with names like

0 commit comments

Comments
 (0)