You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 15, 2018. It is now read-only.
There's an obvious disagreement between the documented types (integer) and the clause head (foo(_)). Here is a process for discovering these kinds of problems:
call is_of_type(integer, foo(_))
if success, the clause head is OK
generate random values of integer (using quickcheck:arbitrary/2) and try unifying them with foo(_)
if we find a single value that unifies, the clause head is OK
clause head is almost certainly wrong; show warning
We should export a predicate which answers the question "is this value possibly compatible with this type?" That step in the process seems like it might be useful elsewhere.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Imagine a predicate defined as follows:
There's an obvious disagreement between the documented types (
integer
) and the clause head (foo(_)
). Here is a process for discovering these kinds of problems:is_of_type(integer, foo(_))
integer
(usingquickcheck:arbitrary/2
) and try unifying them withfoo(_)
We should export a predicate which answers the question "is this value possibly compatible with this type?" That step in the process seems like it might be useful elsewhere.
The text was updated successfully, but these errors were encountered: