summaryrefslogtreecommitdiff
path: root/DSL/Intrinsics.hs
diff options
context:
space:
mode:
Diffstat (limited to 'DSL/Intrinsics.hs')
-rw-r--r--DSL/Intrinsics.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/DSL/Intrinsics.hs b/DSL/Intrinsics.hs
index 72bee4f..ecb0fad 100644
--- a/DSL/Intrinsics.hs
+++ b/DSL/Intrinsics.hs
@@ -91,6 +91,13 @@ or' = binBoolean "OR" $ \ x y -> [x || y]
xor :: StackModifier
xor = binBoolean "XOR" $ \ x y -> [x /= y]
+strcat :: StackModifier
+strcat = StackModifier { smName="STRCAT", smTypes=ts, smFunc=f }
+ where
+ ts = [tString, tString]
+ f (StackString x:StackString y:xs) = return $ StackString (x ++ y):xs
+ f _ = unreachable
+
equal :: StackModifier
equal = StackModifier { smName="EQUAL", smTypes=ts, smFunc=f }
where