Crate junglefowl
source ·Expand description
Brutally murdering Rust’s type system one proof at a time.
Re-exports
pub use nest::Nest;
Modules
- Compile-time-length arrays that can be spliced up however you’d like while keeping full knowledge of every piece’s length.
- Peano arithmetic: essentially unary encoding in types rather than values.
Macros
- Add two Peano types.
- Array type holding N elements of type T.
- Place N elements into a nested tuple of known shape at compile time. Inspired by
frunk
’s implementation but with trailing comma support and a different sentinel node. - Create a unique type representing the given number.
- Syntactic sugar for
Split::<peano!($n)>>::split($nest)
. - Assert at compile time that two Peano types represent the same number.
- Assert at compile time that two Peano types represent different numbers.
- Assert at compile time that a Peano type does not represent zero (and thus must be positive).
- Assert at compile time that a Peano type represents zero.
- Subtract two Peano types.
Enums
- A type that can never be instantiated (inhabited by zero values). Corresponds to a false statement under the Curry-Howard correspondence.