snix/tvix/eval/src
Vincent Ambo 4eafaae9e6 feat(tvix/eval): implement binary comparison operators
This is accomplished by simply delegating to the Rust implementations
of (Partial)Ord and (Partial)Eq, which are implemented for Value and
underlying wrapper types to behave like they do in Nix.

To ease the implementation overhead, a new comparison operator macro
has been added to the VM module.

Incomparable types will raise a new error variant when a comparison is
attempted, containing both supplied types. This mimics the information
carried in the error thrown by C++ Nix.

Change-Id: Ia19634d69119d40722f3ca672387bc3a80096998
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6143
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2022-08-25 12:07:30 +00:00
..
tests feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
value feat(tvix/eval): implement attrset update (//) operator 2022-08-25 11:34:00 +00:00
chunk.rs feat(tvix/eval): add initial chunk representation 2022-08-12 13:05:16 +00:00
compiler.rs feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
errors.rs feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
eval.rs chore(tvix/eval): only print AST if requested 2022-08-24 21:25:41 +00:00
main.rs feat(tvix/tests): check in Nix' language test suite 2022-08-24 21:25:41 +00:00
opcode.rs feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00
vm.rs feat(tvix/eval): implement binary comparison operators 2022-08-25 12:07:30 +00:00