From f3cdc3a9e7255ff8973db23cc4ba55a9f14fd0e4 Mon Sep 17 00:00:00 2001 From: logicmoo Date: Sat, 21 Dec 2024 19:14:33 -0800 Subject: [PATCH] fixes for d4_type_prop.metta --- prolog/metta_lang/metta_types.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prolog/metta_lang/metta_types.pl b/prolog/metta_lang/metta_types.pl index 60cc59dd6e..fab1a5f9ed 100755 --- a/prolog/metta_lang/metta_types.pl +++ b/prolog/metta_lang/metta_types.pl @@ -441,7 +441,8 @@ % Ensure no repeated types using no_repeats_var/1. no_repeats_var(NoRepeatType), % Retrieve the type of the value. - get_type_each(Depth, Self, Val, Type), Type\=='', + call_nth(get_type_each(Depth, Self, Val, Type),Nth), Type\=='', + (Nth >1 -> Type\== 'Atom' ; true), % Ensure the type matches the expected no-repeat type. NoRepeatType = Type, Type = TypeO, @@ -618,6 +619,7 @@ trace_get_type(How, Type, gt(Val))), (trace_get_type('FAILED', '', gt(Val)), fail)). + %! get_type_cmpd_2nd_non_nil(+Depth, +Self, +Val, -Type, -How) is nondet. % % Determines the type of a compound value, ensuring that if multiple types