diff options
author | tomsmeding <tom.smeding@gmail.com> | 2019-11-22 22:37:27 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2019-11-22 22:37:27 +0100 |
commit | 8cfb2879d9d5e9df9abb23bae8420f61005980e8 (patch) | |
tree | 7c03c2072afbbc9eac7d9fa266f092ea9137444c | |
parent | d6402046d2294798e8ba8e27be0368f31310f238 (diff) |
Allow multiple arguments to 'error' in VM
-rw-r--r-- | VM.hs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -175,7 +175,7 @@ vmRunBuiltin state "type-number?" [value] = return (RVNum (case value of { RVNum vmRunBuiltin state "type-string?" [value] = return (RVNum (case value of { RVString _ -> 1; _ -> 0 }), state) vmRunBuiltin state "type-quoted?" [value] = return (RVNum (case value of { RVQuoted _ -> 1; _ -> 0 }), state) vmRunBuiltin state "type-symbol?" [value] = return (RVNum (case value of { RVName _ -> 1; _ -> 0 }), state) -vmRunBuiltin _ "error" [RVString str] = throw ("error: " ++ str) +vmRunBuiltin _ "error" values = throw ("error: " ++ intercalate " " (map show values)) vmRunBuiltin _ name args = error (name ++ " " ++ show args) equalOp :: RunValue -> RunValue -> Either String Bool |