BlockstreamResearch / simfony

Rust-like high-level language that compiles down to Simplicity bytecode. Work in progress.
19 stars 6 forks source link

Add functions #64

Closed uncomputable closed 1 month ago

uncomputable commented 1 month ago

Depends on #63 Better version of #24

Move the existing parts of the program into the main function (except type aliases). Add the possibilities to define more functions outside the main function. Functions can be called after they are defined. This feels like 1970, but it keeps the compiler simple.

Witness expressions are only allowed inside the main function to prevent indirect witness reuse via multiple function calls.

uncomputable commented 1 month ago

Rebased and ready for review