Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge two sums #15

Closed
ice1000 opened this issue Mar 19, 2019 · 1 comment
Closed

Merge two sums #15

ice1000 opened this issue Mar 19, 2019 · 1 comment
Assignees
Labels
first-class sum Another part of MLPolyR
Milestone

Comments

@ice1000
Copy link
Member

ice1000 commented Mar 19, 2019

Syntax:

let bool: Type = Sum { True } ++ Sum { False };

Things to consider:

  • How do we merge recursive types?
@ice1000 ice1000 added the first-class sum Another part of MLPolyR label Mar 19, 2019
@ice1000 ice1000 self-assigned this Mar 19, 2019
ice1000 added a commit that referenced this issue Mar 19, 2019
@ice1000 ice1000 added this to the 0.2.6 milestone Mar 20, 2019
ice1000 added a commit that referenced this issue Mar 20, 2019
@ice1000
Copy link
Member Author

ice1000 commented Mar 27, 2019

Currently, I will make this code

rec nat: Type = Sum { Zero | Suc nat };
let unit: Type = Sum { TT };
nat ++ unit

return Sum { TT | Zero | Suc nat }, instead of rec bla: Type = Sum { TT | Zero | Suc bla }; bla.

ice1000 added a commit that referenced this issue Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-class sum Another part of MLPolyR
Projects
None yet
Development

No branches or pull requests

1 participant