1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-03 09:41:10 +03:00
juvix/test/Compilation
Paul Cadman 2e006421a5
Support nockma scry (#2678)
This PR adds support for Anoma/Nockma scry OP. It is used for obtaining
values from the Anoma storage (key value store). See the [linked
issue](https://github.com/anoma/juvix/issues/2672) for details on scry.

This PR adds support for scry to the Nockma language and compilation
from the frontend via a builtin: `anoma-get`:

```
builtin anoma-get
axiom anomaGet : {Value Key : Type} -> Key -> Value
```

In the backend, the `Value` and `Key` types could be anything, they will
depend on choices of Anoma applications. The type of the returned
`Value` is unchecked. It's currently the responsibility of the user to
match the annotated type with the type of data in storage.

We will not put this builtin in the standard library. It will be exposed
in the anoma-juvix library. It's likely that the frontend `anomaGet`
function will evolve as we use it to write Anoma applications and learn
how they work.

* Closes https://github.com/anoma/juvix/issues/2672

---------

Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2024-03-21 16:44:14 +01:00
..
Base.hs Support nockma scry (#2678) 2024-03-21 16:44:14 +01:00
Negative.hs Run test suite in parallel (#2507) 2023-11-16 16:19:52 +01:00
Positive.hs Add field element type (#2659) 2024-02-27 14:54:43 +01:00