Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Numeric poly variant support #349

Merged
merged 4 commits into from
Apr 10, 2021
Merged

Conversation

IwanKaramazow
Copy link
Contributor

Extends the grammar of poly variants with integers.

let one = #1

switch numericPolyVar {
| #89 => ()
}

type permissions = [
  | #777
  | #644
]

@bobzhang
Copy link
Member

some more test cases:

type t = [
  | #1 (string)
  | #2 (int, string)
]

Note this is not very useful but to be consistent && the backed treats them in a uniform way.

@IwanKaramazow IwanKaramazow force-pushed the numeric-poly-var-support branch from de70968 to 2e0ed12 Compare April 10, 2021 09:32
@IwanKaramazow IwanKaramazow marked this pull request as ready for review April 10, 2021 09:57
@IwanKaramazow IwanKaramazow merged commit 0b6a6e3 into master Apr 10, 2021
@IwanKaramazow IwanKaramazow deleted the numeric-poly-var-support branch April 10, 2021 10:01
@IwanKaramazow IwanKaramazow restored the numeric-poly-var-support branch April 10, 2021 13:56
chenglou pushed a commit that referenced this pull request Apr 10, 2021
* Extend grammar of poly variants with integers
* Implement printer support for numeric poly var
* Add extra test cases for numeric poly variants with payloads.
* Implement numeric poly var printing for outcome printer
@chenglou chenglou deleted the numeric-poly-var-support branch April 30, 2021 09:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants