1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 14:13:27 +03:00
Commit Graph

3 Commits

Author SHA1 Message Date
Łukasz Czajka
3030196fdd Non-recursive definitions (#3138)
* Closes #2968 
* Implements detection of function-like definitions, which either:
  - have some arguments on the left of `:`, or
  - have at least one clause.
* Only function-like definitions are recursive.
* Non-recursive definitions are not mutually recursive either, and can
be used only after their definition. This necessitates rearranging some
definitions in existing Juvix code.
* Changes the scoping of identifiers in record updates. Now field names
on the right side don't refer to the old values of the record fields but
to identifiers in scope defined outside the record update. To refer to
old values, one needs to explicitly use record projections, e.g.
```
r@Rec{x := Rec.x r}
```
2024-11-04 18:18:39 +01:00
Jan Mas Rovira
82e6b5f5d2
Merge if -> ite renaming from stdlib (#2869) 2024-07-02 10:03:06 +02:00
Łukasz Czajka
55598e0f95
Rust backend (#2787)
* Implements code generation through Rust.
* CLI: adds two `dev` compilation targets: 
  1. `rust` for generating Rust code
  2. `native-rust` for generating a native executable via Rust
* Adds end-to-end tests for compilation from Juvix to native executable
via Rust.
* A target for RISC0 needs to be added in a separate PR building on this
one.
2024-05-29 13:34:04 +02:00