diff options
author | Akshay <[email protected]> | 2020-10-09 13:36:19 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-10-09 13:36:19 +0100 |
commit | 217fbf90c4e632a298fbe8a31ef18b71c6bce2ce (patch) | |
tree | b402b827b9846ac7bea30da76f02dcadacda486d | |
parent | 6a9e6bd0b440234e6b5f89414ca340867e8b6c98 (diff) |
mimic guile's errors
-rw-r--r-- | src/Error.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Error.hs b/src/Error.hs index 276d3e2..165cc5c 100644 --- a/src/Error.hs +++ b/src/Error.hs | |||
@@ -21,7 +21,7 @@ instance Show LispError where | |||
21 | show (Parse e) = "Parser Error: " ++ show e | 21 | show (Parse e) = "Parser Error: " ++ show e |
22 | show (BadForm s expr) = "Bad Form: " ++ s ++ ": " ++ show expr | 22 | show (BadForm s expr) = "Bad Form: " ++ s ++ ": " ++ show expr |
23 | show (ArgCount n es) = "Invalid arity, expected " ++ show n ++ ", got values: " ++ unwordsList es | 23 | show (ArgCount n es) = "Invalid arity, expected " ++ show n ++ ", got values: " ++ unwordsList es |
24 | show (UnknownFunction fn) = "Unknown reference to function: " ++ fn | 24 | show (UnknownFunction fn) = "Cannot apply function: " ++ fn |
25 | show (TypeMismatch msg got) = "Type mismatch, expected " ++ msg ++ ", got: " ++ show got | 25 | show (TypeMismatch msg got) = "Type mismatch, expected " ++ msg ++ ", got: " ++ show got |
26 | 26 | ||
27 | type LispResult = Either LispError | 27 | type LispResult = Either LispError |