Other kinds of abstract definitions
- Dominant language
- OCaml
- Stars
- 45
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
The `abstr` visibility mode for types means that the type is public, but constructors (values) are not. The `abstr` with the same semantics would be useful for other kinds of definitions. A motivating example is to create a global handler with public effect, but private capability that is used for defining other useful function. For instance, consider the following implementation of logging, assuming that `hState` is a library defined handler for state (btw, we have not such handler yet).
```fram
abstr handle logger / Log with hState
pub let log msg =
logger := msg :: logger.get ()
...
```
Here, the `Log` effect should be public, but the capability `logger` should be private.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.