1
1
mirror of https://github.com/tweag/nickel.git synced 2024-10-06 08:07:37 +03:00
nickel/utils
Yann Hamdaoui f06bda9239
Implement contract deduplication optimization (#1631)
* Duplicate contrat elision: first tentative

* Fix contract deduplication

The previous attempt wasn't fruitful, because we don't pass the initial
environment to the contract equality checker. This commit thread the
initial environment through the virtual machine and various functions to
make it available to the contract deduplicator

* Use contract deduplication for annotations as well

Use a special contract deduplication to avoid pretty printing many many
identical type annotations when evaluating. The actual contract
applications were already elided as far as evaluation is concerned, but
contracts annotations were still accumulated without deduplication.

* Rename elision->dedup which is better descriptive

* Fix clippy warning

* Fix cargo doc warnings

* Cosmetic improvements

* Mention idempotency assumption in the manual

* Update core/src/typecheck/eq.rs

Co-authored-by: Taeer Bar-Yam <Radvendii@users.noreply.github.com>

* Fix REPL query not working anymore

* Update core/src/typecheck/eq.rs

Co-authored-by: jneem <joeneeman@gmail.com>

* Formatting

* Fix clippy error

* Update core/src/program.rs

Co-authored-by: Viktor Kleen <viktor.kleen@tweag.io>

---------

Co-authored-by: Taeer Bar-Yam <Radvendii@users.noreply.github.com>
Co-authored-by: jneem <joeneeman@gmail.com>
Co-authored-by: Viktor Kleen <viktor.kleen@tweag.io>
2023-09-28 16:23:43 +00:00
..
src Implement contract deduplication optimization (#1631) 2023-09-28 16:23:43 +00:00
Cargo.toml Rename and move workspace crates (#1399) 2023-06-26 16:58:40 +00:00