summaryrefslogtreecommitdiff
path: root/DSL/Intrinsics.hs
diff options
context:
space:
mode:
authorMatthew Hall <hallmatthew314@gmail.com>2023-02-18 00:11:29 +1300
committerMatthew Hall <hallmatthew314@gmail.com>2023-02-18 00:11:29 +1300
commit69276220df02d2c226021d79ee4a4fd173ae85ee (patch)
treea53bf65216fcbc0ed11d19e90daf9a4be31d6019 /DSL/Intrinsics.hs
parentc8e97a9e6ebfefec0db5bc51bd095b3d10dfd078 (diff)
String literals, fizzbuzz, other tweaks
Diffstat (limited to 'DSL/Intrinsics.hs')
-rw-r--r--DSL/Intrinsics.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/DSL/Intrinsics.hs b/DSL/Intrinsics.hs
index 11b37f3..72bee4f 100644
--- a/DSL/Intrinsics.hs
+++ b/DSL/Intrinsics.hs
@@ -7,7 +7,11 @@ dump :: StackModifier
dump = StackModifier { smName="DUMP", smTypes=ts, smFunc=f }
where
ts = [tAny]
- f (x:xs) = putStrLn (show x) >> return xs
+ f (x:xs) = putStrLn x' >> return xs
+ where
+ x' = case x of
+ StackString s -> s
+ _ -> show x
f _ = unreachable
drop' :: StackModifier