mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-05 20:40:02 -08:00
The analysis was conducted as joint effort between @koraa and @blipp. Co-authored-by: Benjamin Lipp <blipp@mailbox.org>
16 lines
540 B
Plaintext
16 lines
540 B
Plaintext
#pragma once
|
|
#include "prelude/basic.mpv"
|
|
|
|
#define DECL_SETUP(T) \
|
|
type T ## _prec. \
|
|
type T ## _tmpl. \
|
|
fun trusted_ ## T(T ## _prec) : T [private]. \
|
|
fun prepare_ ## T(T) : T ## _tmpl. \
|
|
fun setup_ ## T(T ## _tmpl) : T \
|
|
reduc forall v:T; \
|
|
setup_ ## T(prepare_ ## T(v)) = v \
|
|
[private]. \
|
|
fun make_trusted_ ## T(T ## _prec) : T ## _tmpl \
|
|
reduc forall v:T ## _prec; \
|
|
make_trusted_ ## T(v) = prepare_ ## T(trusted_ ## T(v)).
|