From da22a93ce239ca9e3c7715f0547aa194daf4ca1c Mon Sep 17 00:00:00 2001 From: Nydragon <6582485n@proton.me> Date: Mon, 6 Feb 2023 00:32:07 +0100 Subject: [PATCH 1/2] [Refacto] update function0 --- .github/workflows/haskell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index a2c7a1b..c469740 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -38,6 +38,6 @@ jobs: run: cabal build --enable-tests --enable-benchmarks all - name: Run tests run: | - cabal test all; find . -wholename "*glados/glados" -exec cp {} . \;; + cabal test all; From ebb8be2162c43adeff7bc9d7797641a8505df5f1 Mon Sep 17 00:00:00 2001 From: Nydragon <6582485n@proton.me> Date: Mon, 6 Feb 2023 00:35:46 +0100 Subject: [PATCH 2/2] [Refacto] update exception messages --- lib/Exec/RuntimeException.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Exec/RuntimeException.hs b/lib/Exec/RuntimeException.hs index cd07662..738ae90 100644 --- a/lib/Exec/RuntimeException.hs +++ b/lib/Exec/RuntimeException.hs @@ -25,12 +25,12 @@ instance Exception RuntimeException instance Show RuntimeException where show :: RuntimeException -> String - show (InvalidFunctionCall a) = a ++ " is an invalid function call." - show UndefinedBehaviour = "This is undefined." - show NotYetImplemented = "OH MAXI BEBOU" - show (InvalidArgument a b c) = "Argument " ++ show a ++ " invalid: expected '" ++ b ++ "' but received '" ++ c ++ "'." - show (InvalidArgumentCount fn) = "Function " ++ fn ++ ": Invalid arg count." - show NullDivision = "Did you not pay attention in math class?" + show (InvalidFunctionCall a) = "InvalidFunctionCall: " ++ a ++ " is not a function." + show UndefinedBehaviour = "UndefinedBehaviour: This behaviour is undefined." + show NotYetImplemented = "NotYetImplemented" + show (InvalidArgument a b c) = "InvalidArgument: argument " ++ show a ++ ", expected '" ++ b ++ "' but received '" ++ c ++ "'." + show (InvalidArgumentCount fn) = "InvalidArgumentCount: Function " ++ fn ++ " received an invalid amount of arguments." + show NullDivision = "NullDivision: Did you not pay attention in math class?" data InternalException = NonAtomicFunctionArgs String [Ast.Expr]