]> Repositorios git - scryer-prolog.git/commitdiff
add fail predicate
authorMark Thom <[email protected]>
Fri, 21 Jun 2019 00:59:27 +0000 (20:59 -0400)
committerMark Thom <[email protected]>
Fri, 21 Jun 2019 00:59:27 +0000 (20:59 -0400)
README.md
src/prolog/lib/builtins.pl

index 4982068f01fd9d52c1587350202a6488eb6b759c..9462e399d46d3483dcf57f5308b75e721e157ce8 100644 (file)
--- a/README.md
+++ b/README.md
@@ -187,6 +187,7 @@ The following predicates are built-in to Scryer.
 * `dif/2`
 * `expand_goal/2`
 * `expand_term/2`
+* `fail/0`
 * `false/0`
 * `findall/{3,4}`
 * `float/1`
index d145deaca2c4eadee1a34eb6ead5822f91eb52b1..e093a1dda5957386a7af9f84d60a631a30f360e1 100644 (file)
        assertz/1, atom_chars/2, atom_codes/2, atom_concat/3,
        atom_length/2, bagof/3, catch/3, char_code/2, clause/2,
        current_op/3, current_predicate/1, current_prolog_flag/2,
-       expand_goal/2, expand_term/2, false/0, findall/3, findall/4,
-       get_char/1, halt/0, number_chars/2, number_codes/2, once/1,
-       op/3, read_term/2, repeat/0, retract/1, set_prolog_flag/2,
-       setof/3, sub_atom/5, subsumes_term/2, term_variables/2,
-       throw/1, true/0, unify_with_occurs_check/2, write/1,
-       write_canonical/1, write_term/2, writeq/1]).
+       expand_goal/2, expand_term/2, fail/0, false/0, findall/3,
+       findall/4, get_char/1, halt/0, number_chars/2, number_codes/2,
+       once/1, op/3, read_term/2, repeat/0, retract/1,
+       set_prolog_flag/2, setof/3, sub_atom/5, subsumes_term/2,
+       term_variables/2, throw/1, true/0, unify_with_occurs_check/2,
+       write/1, write_canonical/1, write_term/2, writeq/1]).
 
 % module resolution operator.
 :- op(600, xfy, :).
@@ -123,6 +123,8 @@ set_prolog_flag(Flag, _) :-
 
 % control operators.
 
+fail :- '$fail'.
+
 \+ G :- G, !, false.
 \+ _.