Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The args file to the prove CLI must now be textual nock term #3253

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

paulcadman
Copy link
Collaborator

This PR makes the behaviour of the anoma prove CLI arguments match the documented behaviour.

Previously the arguments file was expected to be jammed bytes unless it had the extension .debug.nockma. Now the arguments file must be a textual nock term of the form [arg1 arg2 ... argn 0] i.e a Nock list of arguments and the file can have any name.

For example:

Test.juvix

module Test;

import Stdlib.Prelude open;

main : List Nat -> List Nat
  | xs := map \{ x := x * 2 } xs;

If you want to pass the list[1;2;3] as the argument you create a file:

Test.args

[[1 2 3 0] 0]

And run:

$ juvix compile anoma Test.juvix
$ juvix dev anoma prove Test.nockma --args Test.args
$ juvix dev nockma encode --from bytes --to text < Test.proved.nockma
[2 4 6 0]

@paulcadman paulcadman added this to the 0.6.9 milestone Dec 19, 2024
@paulcadman paulcadman self-assigned this Dec 19, 2024
@paulcadman paulcadman merged commit 4c1a686 into main Dec 19, 2024
4 checks passed
@paulcadman paulcadman deleted the prove-text-term-nock branch December 19, 2024 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prove --args is DEEPLY FLAWED. Maybe jam and cue as well... IDK
2 participants