summaryrefslogtreecommitdiff
path: root/VM.hs
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2019-11-22 22:37:01 +0100
committertomsmeding <tom.smeding@gmail.com>2019-11-22 22:37:01 +0100
commitd6402046d2294798e8ba8e27be0368f31310f238 (patch)
tree13c5da307a8ef3ab5cef41c6c2bac8aa3bce690d /VM.hs
parenta96558fd3c1ed3417fbdcd76361b398640e176f6 (diff)
Fix error message bug in VM
Diffstat (limited to 'VM.hs')
-rw-r--r--VM.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/VM.hs b/VM.hs
index 784c93b..b3df10a 100644
--- a/VM.hs
+++ b/VM.hs
@@ -64,7 +64,7 @@ vmRunInstr info@(Info _ _ datas) state@(State { sTempMap = tmap, sArgs = args, s
IAssign ref -> return (assignRef state dest (findRef tmap ref))
IParam i ->
if i < length args then return (assignRef state dest (args !! i))
- else error $ show closure ++ ", " ++ show i ++ ", param-out-of-range"
+ else error $ show args ++ ", " ++ show i ++ ", param-out-of-range"
IClosure i ->
if i < length closure then return (assignRef state dest (closure !! i))
else error $ show closure ++ ", " ++ show i ++ ", closure-out-of-range"