From 35a122b2ba0b2703a1cbc52135d1ead281e42c6e Mon Sep 17 00:00:00 2001 From: sforman Date: Sat, 21 Oct 2023 12:17:21 -0700 Subject: [PATCH] Runtime type checking for comparison ops. Because we're using Scheme Booleans for Thun Booleans there's no need to make a special function for these, we can reuse the one for math ops. --- implementations/scheme-chicken/joy.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/implementations/scheme-chicken/joy.scm b/implementations/scheme-chicken/joy.scm index 572a4b5..4c3e7a2 100644 --- a/implementations/scheme-chicken/joy.scm +++ b/implementations/scheme-chicken/joy.scm @@ -63,12 +63,12 @@ ((/ div) (values (joy-math-func quotient stack) expression dict)) ; but for negative divisor, no!? ((% mod) (values (joy-math-func modulo stack) expression dict)) - ((< lt) (joy-func < stack expression dict)) - ((> gt) (joy-func > stack expression dict)) - ((<= le) (joy-func <= stack expression dict)) - ((>= ge) (joy-func >= stack expression dict)) - ((= eq) (joy-func = stack expression dict)) - ((<> != neq) (joy-func not-equal stack expression dict)) + ((< lt) (values (joy-math-func < stack) expression dict)) + ((> gt) (values (joy-math-func > stack) expression dict)) + ((<= le) (values (joy-math-func <= stack) expression dict)) + ((>= ge) (values (joy-math-func >= stack) expression dict)) + ((= eq) (values (joy-math-func = stack) expression dict)) + ((<> != neq) (values (joy-math-func not-equal stack) expression dict)) ((bool) (joy-bool stack expression dict))