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

Add support for anoma-encode builtin #2766

Merged
merged 23 commits into from
May 14, 2024
Merged

Add support for anoma-encode builtin #2766

merged 23 commits into from
May 14, 2024

Conversation

paulcadman
Copy link
Collaborator

@paulcadman paulcadman commented May 3, 2024

This PR adds support for the anoma-encode builtin:

builtin anoma-encode
axiom anomaEncode : {A : Type} -> A -> Nat

In the backend this is compiled to a call to the Anoma / nockma stdlib jam function.

This PR also contains:

  • An implementation of the jam function in Haskell. This is used in the Nockma evaluator.
  • Unit tests for jam
  • A benchmark for jam applied to the Anoma / nockma stdlib.

Benchmark results:

$ juvixbench -p 'Jam'
All
  Nockma
    Jam
      jam stdlib: OK
        109  ms ± 6.2 ms

@paulcadman paulcadman added this to the 0.6.2 milestone May 3, 2024
@paulcadman paulcadman self-assigned this May 3, 2024
@paulcadman paulcadman force-pushed the support-anoma-encode branch 4 times, most recently from 4102a75 to 4b0cd40 Compare May 10, 2024 14:03
@paulcadman paulcadman force-pushed the support-anoma-encode branch from 0611a17 to 69aa223 Compare May 14, 2024 13:49
@paulcadman paulcadman marked this pull request as ready for review May 14, 2024 13:49
@paulcadman paulcadman merged commit 1ab94f5 into main May 14, 2024
5 of 8 checks passed
@paulcadman paulcadman deleted the support-anoma-encode branch May 14, 2024 16:45
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.

2 participants