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

Type Check: Match With #18

Open
CodyFagley opened this issue Nov 19, 2019 · 0 comments
Open

Type Check: Match With #18

CodyFagley opened this issue Nov 19, 2019 · 0 comments
Labels
prebug Not a bug yet, but will be soon

Comments

@CodyFagley
Copy link
Member

CodyFagley commented Nov 19, 2019

match ... with ... expressions need to be type checked to ensure each resulting functional expression is of the same type expression.

See the following:

match e with
     f1 -> g1
  |  f2 -> g2
  |  f3 -> g3

In other words, g1, g2, and g3 must all be of equivalent type expressions. They do not have to be the same constructor.

Update (06/15/2021): Should this be allowed to work when g1 through g3 are all constrained by the same typeclass, but not the same type?

@CodyFagley CodyFagley added the prebug Not a bug yet, but will be soon label Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prebug Not a bug yet, but will be soon
Projects
None yet
Development

No branches or pull requests

1 participant