Created
February 6, 2024 23:36
-
-
Save aserranoni/eacf235e953e59c7374de255e7e67ffc to your computer and use it in GitHub Desktop.
Simple repl example showing bad interaction between typechecking/ formal verification with where function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(begin-tx "module") | |
(env-data | |
{ 'ns-admin-keyset: ["admin"] | |
, 'ns-operate-keyset: ["operate"] | |
, 'ns-genesis-keyset: { "keys": [], "pred": "="} | |
, 'ns: "la" | |
, 'upgrade:false}) | |
(env-keys ["admin", "operate"]) | |
(define-namespace 'la (read-keyset 'ns-admin-keyset) (read-keyset 'ns-genesis-keyset)) | |
(namespace (read-msg 'ns)) | |
(module fv-test GOV | |
(defcap GOV () true) | |
(defschema my-schema | |
prop:string) | |
(deftable my-table:{my-schema}) | |
(defun get-prop-rows (prop-val:string) | |
(let ( | |
(entries (filter (where 'prop (= prop-val)) my-table)) | |
) | |
entries | |
) | |
) | |
) | |
(commit-tx) | |
(begin-tx "la") | |
(typecheck "la.fv-test") | |
(commit-tx) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment