summaryrefslogtreecommitdiff
path: root/DSL/Util.hs
diff options
context:
space:
mode:
Diffstat (limited to 'DSL/Util.hs')
-rw-r--r--DSL/Util.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/DSL/Util.hs b/DSL/Util.hs
index 67435a2..7767b4b 100644
--- a/DSL/Util.hs
+++ b/DSL/Util.hs
@@ -13,6 +13,10 @@ tInt :: TypeCheck
tInt (StackInt _) = True
tInt _ = False
+tString :: TypeCheck
+tString (StackString _) = True
+tString _ = False
+
runChecks :: [TypeCheck] -> Stack -> Maybe String
runChecks fs s
| length fs > length s = Just "stack underflow"