1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-27 01:23:32 +03:00
juvix/test/Nockma
Paul Cadman 49c14be71e
Fix nock compilation and builtin evaluation of sha256 stdilb (#3175)
This PR:

1. Fixes the compilation of the sha256 builtin anoma lib call

A sha256 hash is 32 bytes long, not 64 bytes. This number is used when
constructing the ByteArray representation (i.e `[length payload]` cell)
of the output of Anoma stdlib sha256 call. The Anoma stdlib sha256 call
just returns the atom payload.

2. Fixes the evaluation of the sha256 stdlib call

Previously we were converting the sha256 hash bytestring to Base16
format. This is convenient when displaying the ByteString hash. However
the Anoma nock interpreter outputs the raw bytes so we must change the
builtin evaluator to match this behaviour.

After these fixes we can re-enable the test084 anoma compilation test.
2024-11-14 18:54:39 +01:00
..
Compile/Tree Add anoma nockma tests (#3134) 2024-11-05 13:28:28 +00:00
Eval Add option to run Anoma tests in non-debug mode (#3144) 2024-11-07 13:11:41 +00:00
Parse Use prettyString instead of show . pretty (#2711) 2024-04-12 10:26:54 +02:00
Compile.hs Translation from Juvix Tree to Nockma (#2614) 2024-02-06 08:33:14 +00:00
Encoding.hs Fix nock compilation and builtin evaluation of sha256 stdilb (#3175) 2024-11-14 18:54:39 +01:00
Eval.hs Add nockma evaluator (#2564) 2024-01-11 12:04:38 +00:00
Parse.hs Add nockma evaluator (#2564) 2024-01-11 12:04:38 +00:00