Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refacto] update function0 #47

Merged
merged 2 commits into from
Feb 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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;

12 changes: 6 additions & 6 deletions lib/Exec/RuntimeException.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down