From 28ab4a097fb73a138850a3fb7f6e480765c702ee Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Sat, 18 Feb 2023 17:19:09 +1300 Subject: Add STRCAT, update fizzbuzz --- DSL/Util.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'DSL/Util.hs') 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" -- cgit v1.2.1