BlockstreamResearch / simfony

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

Add functions #64

Closed uncomputable closed 3 months ago

uncomputable commented 3 months 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 3 months ago

Rebased and ready for review