From 41ed1788cb3e1b11d9405fc190a2326a37958c36 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Thu, 9 Jun 2022 11:10:09 +0200 Subject: [PATCH] :sparkles: --- Fasto/Parser.fsp | 2 +- Fasto/TypeChecker.fs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Fasto/Parser.fsp b/Fasto/Parser.fsp index fcad116..9cbe67e 100644 --- a/Fasto/Parser.fsp +++ b/Fasto/Parser.fsp @@ -23,7 +23,7 @@ let parse_error_rich = // TODO: Add new (lexer) token definitions: // // TODO: project task 1 : -// - multiplication (*), division (/), numerical negation (~), +// - multiplication (*), division (/), numerical negation (~), // logical negation (not), logical and (&&), logical or (||), // boolean literals (true, false) // - add the required precedence and associativity rules for diff --git a/Fasto/TypeChecker.fs b/Fasto/TypeChecker.fs index 6dfd2ab..01f669e 100644 --- a/Fasto/TypeChecker.fs +++ b/Fasto/TypeChecker.fs @@ -350,21 +350,21 @@ and checkExp (ftab : FunTable) let elem_type = match arr_type with | Array t -> t - | _ -> reportTypeWrongKind "third argument of reduce" "array" arr_type pos + | _ -> reportTypeWrongKind "third argument of scan" "array" arr_type pos let (f', f_argres_type) = match checkFunArg ftab vtab pos f with | (f', res, [a1; a2]) -> if a1 <> a2 then - reportTypesDifferent "argument types of operation in reduce" + reportTypesDifferent "argument types of operation in scan" a1 a2 pos if res <> a1 then - reportTypesDifferent "argument and return type of operation in reduce" + reportTypesDifferent "argument and return type of operation in scan" a1 res pos (f', res) | (_, res, args) -> - reportArityWrong "operation in reduce" 2 (args,res) pos + reportArityWrong "operation in scan" 2 (args,res) pos if elem_type <> f_argres_type then - reportTypesDifferent "operation and array-element types in reduce" + reportTypesDifferent "operation and array-element types in scan" f_argres_type elem_type pos if e_type <> f_argres_type then reportTypesDifferent "operation and start-element types in scan"