Crate lambda_types

source ·
Expand description

§lambda-rs

§ Lambda calculus? In my type system? (It’s more likely than you think.)

Implements the Lambda Calculus in Rust’s type system.

There is zero runtime functionality or procedural macros in this crate - it’s all done using generics, traits, and associated types.

If you want to toy around with this, check out the prelude.

If you want to write your own function types, check out the Macros.

The Y combinator is left unimplemented, as Rust evaluates types greedily, making it unusable.

Modules§

  • Function types relating to boolean algebra.
  • Function types relating to the “pair” datatype, and singly linked lists made out of them.
  • Helper macros for easier definition and usage of function types.
  • Function types relating to church numerals and mathematics.
  • A module you can glob import to get many useful things in scope.
  • Primitive constructs that are often useful.

Macros§

  • Ergonomic wrapper macro for calling a function.
  • Chains applications of a function onto many arguments.
  • Helper macro for easily defining types that implement crate::Function.

Traits§