aboutsummaryrefslogtreecommitdiff
path: root/src/compile/comparisons.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compile/comparisons.c')
-rw-r--r--src/compile/comparisons.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compile/comparisons.c b/src/compile/comparisons.c
index afb5dc15..99f220e3 100644
--- a/src/compile/comparisons.c
+++ b/src/compile/comparisons.c
@@ -50,6 +50,8 @@ Text_t compile_comparison(env_t *env, ast_t *ast) {
switch (operand_t->tag) {
case BigIntType:
return Texts(ast->tag == Equals ? EMPTY_TEXT : Text("!"), "Int$equal_value(", lhs, ", ", rhs, ")");
+ case RealType:
+ return Texts(ast->tag == Equals ? EMPTY_TEXT : Text("!"), "Real$equal_values(", lhs, ", ", rhs, ")");
case BoolType:
case ByteType:
case IntType:
@@ -94,6 +96,7 @@ Text_t compile_comparison(env_t *env, ast_t *ast) {
const char *op = comparison_operator(ast->tag);
switch (operand_t->tag) {
case BigIntType: return Texts("(Int$compare_value(", lhs, ", ", rhs, ") ", op, " 0)");
+ case RealType: return Texts("(Real$compare_values(", lhs, ", ", rhs, ") ", op, " 0)");
case BoolType:
case ByteType:
case IntType: