CodeusTech / CodeusTech/Xita

Type Check: Match With

Open
#18 0 comments 0 reactions 0 assignees View on GitHub
prebug
Dominant language
C++
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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

See the following:
```ocaml
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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.