-
Notifications
You must be signed in to change notification settings - Fork 8
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
defphrase not matching set parameter #29
Comments
I faced a similar problem. ;; Need :a or :b
(s/def ::rule #(some #{:a :b} (keys %)))
;; When check {:x 1}, of-course it raises error
(s/explain-data ::rule {:x 1})
;; When phrase
(p/phrase-first {} ::rule {:x 1})
;; It CAN be invoked and show "errro 1"
(p/defphraser #(some #{:a :b} (keys %)) [_ _] "error 1")
;; It CAN NOT be invoked
(p/defphraser #(some my-hash (keys %)) [_ _] "error 2")
;; It CAN NOT be invoked
(p/defphraser #(some my-hash (keys %)) [_ _ my-hash] "error 3") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This library was exactly what I needed. I am having trouble with the defphrase for the following predicate however.
Put together the following code to show the problem.
Despite several attempts I cannot get the phraser dispatching to match. Any help would be appreciated.
The text was updated successfully, but these errors were encountered: