Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

as patterns on both sides #519

Merged
merged 1 commit into from Feb 19, 2021
Merged

as patterns on both sides #519

merged 1 commit into from Feb 19, 2021

Conversation

ilya-klyuchnikov
Copy link
Member

@ilya-klyuchnikov ilya-klyuchnikov commented Feb 19, 2021

This is the first step/example of taking "the smart direction" in bidirectional type-checking.

Before:

foo(X = {Pat1, Pat2}) -> ...
foo({Pat1, Pat2} = X) -> ...

Being "structurally/semantically" equivalent, - they produced different outcomes because of "left -> right" flow of checking.
Now we treat them the same way, -> forcing type-checker into more complicated pattern first (which is likely to produce more information).

It may also be seen as an opening of starting discussion of IR, - since we can just get this specialisation/normalisation in IR when translating from abstract forms.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 19, 2021
@ilya-klyuchnikov ilya-klyuchnikov merged commit 0eb8278 into master Feb 19, 2021
@ilya-klyuchnikov ilya-klyuchnikov deleted the eqwalizer branch February 19, 2021 16:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
3 participants