Add memotables to the pact state. We will temporarily ignore exactly what this will eventually be used for.
For now, we only want a memo table to exist in the pact state, and we provide a repl-only function to add entries to the memo table. This command should put (shift 10 1) => 20 into the memo table:
pact> (env-memoize shift 10 1)
"Ok"
In subsequent evaluations that include (shift 10 1) as a subterm, 20 should be substituted immediately instead of recomputing (shift 10 1).
[ ] PR description contains example output from repl interaction or a snippet from unit test output
[ ] Documentation has been updated if new natives or FV properties have been added. To generate new documentation, issue cabal run tests. If they pass locally, docs are generated.
Add memotables to the pact state. We will temporarily ignore exactly what this will eventually be used for.
For now, we only want a memo table to exist in the pact state, and we provide a repl-only function to add entries to the memo table. This command should put
(shift 10 1) => 20
into the memo table:In subsequent evaluations that include
(shift 10 1)
as a subterm,20
should be substituted immediately instead of recomputing(shift 10 1)
.The PR does not work right now:
I'm still trying to fix this.
PR checklist:
cabal run tests
. If they pass locally, docs are generated.pact -t
), make sure pact-lsp is in sync.Additionally, please justify why you should or should not do the following: