add fail predicate

This commit is contained in:
Mark Thom
2019-06-20 20:59:27 -04:00
parent b2fed73011
commit 07412b9d34
2 changed files with 9 additions and 6 deletions

View File

@@ -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`

View File

@@ -14,12 +14,12 @@
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.
\+ _.