Skip to content

Commit e06fd76

Browse files
committed
compatability_warning
1 parent cb4c1f3 commit e06fd76

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

prolog/metta_lang/metta_eval.pl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,13 +1931,15 @@
19311931
arity_args(Args,[OneArg]), should_be(iz_conz,OneArg), must_unify(OneArg,[H|T]).
19321932
eval_20(_Eq,_RetType,_Depth,_Self,['cons-atom'|TwoArgs],[H|T]):-!,
19331933
arity_args(TwoArgs,[HH,TT]), should_be(iz_conz,TT),H=HH,T=TT,must_unify(TwoArgs,[H,T]).
1934+
1935+
1936+
1937+
should_be(P1,Term):- call(P1,Term)-> true ; (debug_info(compatability_warning,hyperon_throws_error(should_be(P1,Term))),fail).
1938+
19341939
% NEW
19351940
eval_20(_Eq,_RetType,_Depth,_Self,['decons',OneArg],[H,T]):- !, must_unify(OneArg,[H|T]).
19361941
eval_20(_Eq,_RetType,_Depth,_Self,['cons'|TwoArgs],[H|T]):-!, must_unify(TwoArgs,[H,T]).
19371942

1938-
1939-
should_be(P1,Term):- call(P1,Term).
1940-
19411943
%eval_20(Eq,RetType,Depth,Self,['get-doc'|Args],Res):- !,with_all_spaces(eval_args(Eq,RetType,Depth,Self,['metta-get-doc'|Args],Res)),!.
19421944
%eval_20(Eq,RetType,Depth,Self,['help!'|Args],Res):-!,with_all_spaces(eval_args(Eq,RetType,Depth,Self,['metta-help!'|Args],Res)),!.
19431945

0 commit comments

Comments
 (0)