Crates.io | mononym |
lib.rs | mononym |
version | 0.1.0 |
source | src |
created_at | 2021-10-31 14:00:53.308425 |
updated_at | 2021-10-31 14:00:53.308425 |
description | Type-level named values with partial dependent type support in Rust |
homepage | https://github.com/maybevoid/mononym |
repository | https://github.com/maybevoid/mononym |
max_upload_size | |
id | 474735 |
size | 69,005 |
Mononym is a library for creating unique type-level names for each value in Rust. The core type Named<Name, T>
represents a named value of type T
with a unique type Name
as its name. Mononym guarantees that there can be no two values with the same name. With that, the Name
type serves as a unique representation of a Rust value at the type level.
Mononym enables the use of the design pattern Ghosts of Departed Proofs in Rust. It provides macros that simplify the definition of dependent pairs and proof objects in Rust. Although there is still limited support for a full dependently-typed programming in Rust, Mononym helps us move a small step toward that direction by making it possible to refer to values in types.
Here are a few examples sneak peek that are currently work in progress. Apologize for the lack of documentation for the examples. There will be in-depth tutorials that go through the example code and guide the readers on how to use mononym
to define proofs.