Crates.io | sigma-types-macros |
lib.rs | sigma-types-macros |
version | 0.1.0 |
source | src |
created_at | 2025-01-20 00:54:54.838364+00 |
updated_at | 2025-01-20 00:54:54.838364+00 |
description | Macros to enhance the `sigma-types` crate |
homepage | https://github.com/wrsturgeon/sigma-types-macros |
repository | https://github.com/wrsturgeon/sigma-types-macros |
max_upload_size | |
id | 1523438 |
size | 102,616 |
sigma-types
crateThe #[forall]
macro automatically writes a test that ensures that,
for any possible inputs, a function never panics
(which would indicate a broken sigma-type guarantee).
This helps enforce a consistent paradigm in which
any "invariants" or special caveats ought to be readable
directly off an item's type signature for its end-users:
if a certain input combination causes a function to fail,
then it ought to be explicitly disallowed at the type level.
(Internally, this uses quicheck
to do most of the heavy lifting.)