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

Cannot construct a bound symbol #20

Open
RickMoynihan opened this issue Sep 25, 2019 · 1 comment
Open

Cannot construct a bound symbol #20

RickMoynihan opened this issue Sep 25, 2019 · 1 comment

Comments

@RickMoynihan
Copy link
Member

e.g. the following should be allowed:

(let [foo :a] (matcha/construct foo [[foo ?bar ?baz]]))

It should return :a if it exists as a resource in the database, otherwise nil.

However it raises a syntax error:

Syntax error macroexpanding clojure.core/let at (*cider-repl repos/muttnik:localhost:50215(clj)*:1010:45).
nil - failed: simple-symbol? at: [:bindings :form :local-symbol] spec: :clojure.core.specs.alpha/local-name
nil - failed: vector? at: [:bindings :form :seq-destructure] spec: :clojure.core.specs.alpha/seq-binding-form
nil - failed: map? at: [:bindings :form :map-destructure] spec: :clojure.core.specs.alpha/map-bindings
nil - failed: map? at: [:bindings :form :map-destructure] spec: :clojure.core.specs.alpha/map-special-binding
@RickMoynihan
Copy link
Member Author

Note a workaround for this is:

(let [foo :a] (when (matcha/ask [[foo ?bar ?baz]] matcha-db) foo)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant