fram-lang / fram-lang/dbl

ADTs as modules

Open
#44 0 comments 0 reactions 1 assignee Claimed by @forell View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.