From e350c23db1ae68f9aec4f68ffd7a48374b016763 Mon Sep 17 00:00:00 2001 From: Fabian Noll Date: Tue, 14 May 2024 09:36:18 +0200 Subject: [PATCH] fix spelling error --- src/Ast.hs | 2 +- src/Typecheck.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ast.hs b/src/Ast.hs index 6554290..90dcc43 100644 --- a/src/Ast.hs +++ b/src/Ast.hs @@ -30,7 +30,7 @@ data BinaryOperator | Subtraction | Multiplication | Division - | Modulus + | Modulo | BitwiseAnd | BitwiseOr | BitwiseXor diff --git a/src/Typecheck.hs b/src/Typecheck.hs index 7a7ac8d..981d4d8 100644 --- a/src/Typecheck.hs +++ b/src/Typecheck.hs @@ -82,7 +82,7 @@ typeCheckExpression (BinaryOperation op expr1 expr2) symtab classes = TypedExpression "int" (BinaryOperation op expr1' expr2') else error "Division operation requires two operands of type int" - Modulus -> + Modulo -> if type1 == "int" && type2 == "int" then TypedExpression "int" (BinaryOperation op expr1' expr2')