crepe 0.2.0

Datalog in Rust as a procedural macro
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// In this test, the variable named 'n' is used before binding in a clause.

mod datalog {
    use crepe::crepe;

    crepe! {
        @output
        struct Fib(u32, u32);

        Fib(0, 0);
        Fib(1, 1);

        Fib(n, x + y) <- Fib(n - 1, x), Fib(n - 2, y), (n <= 25);
    }
}

fn main() {}