summaryrefslogtreecommitdiff
path: root/src/Interpreter
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-10-26 21:28:28 +0200
committerTom Smeding <tom@tomsmeding.com>2024-10-26 21:28:28 +0200
commit30314e18f48851edc3d39315ac4dd3f60a0a8421 (patch)
treee0c95c8b8034adc275d51be7dc876f4032227b85 /src/Interpreter
parent745ba3a21b6b8dab32134c0d9ba102b164127e23 (diff)
Show accumulator as dummy string, not error
Diffstat (limited to 'src/Interpreter')
-rw-r--r--src/Interpreter/Rep.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Interpreter/Rep.hs b/src/Interpreter/Rep.hs
index baf38fc..7ef9088 100644
--- a/src/Interpreter/Rep.hs
+++ b/src/Interpreter/Rep.hs
@@ -10,6 +10,7 @@ import GHC.TypeError
import Array
import AST
+import AST.Pretty
type family Rep t where
@@ -74,4 +75,4 @@ showValue _ (STScal sty) x = case sty of
STI32 -> shows x
STI64 -> shows x
STBool -> shows x
-showValue _ STAccum{} _ = error "Cannot show accumulators"
+showValue _ (STAccum t) _ = showString $ "<accumulator for " ++ ppTy 0 t ++ ">"