Summary
Allow type definitions to be exported.
Metadata
- Id: d8cca7d7a5b802098ae514fe3c3e8e971b4c03a1
- Trac id: 1796
- Type: enhancement
- Reporter: zaifir
- Owner:
- Cc:
- Status: new
- Component: core libraries
- Estimated difficulty:
- Resolution:
- Priority: major
- Milestone: someday
- Version: 5.3.0
- Changetime: 2022-01-04 20:07:21 UTC
- Created: 2022-01-04 20:07:21 UTC
- Keywords: types modules
Description
Currently, there is no way for a module to export type definitions for public use. (i.e. if a module M defines a type T, there is no way for programs that import M to make use of T; they must use * instead). This severely limits the usefulness of the (chicken type) system, since type checking cannot be used on types outside of the CHICKEN core.
I'd propose an `export`-like form, e.g. `(export-type TYPE ...)` which makes type definitions created with `define-type` available beyond the scope of the containing module.