ADTs as modules
Open
1. type inference
proposal
- Dominant language
- OCaml
- Stars
- 45
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Each definition of a ADT could also be a definition of a module that contains all the constructors. It is possible due to fact that types and modules form separate namespaces that both start with an uppercase letter. The motivation is that it would be easier to work with multiple data-types with the same names of constructors.
```
data T = A | B
data U = A | B
let x = T.A
let y = U.B
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.