From fa5783b6e1e66a67343c0c69992f88f2f9003f53 Mon Sep 17 00:00:00 2001 From: darkf Date: Sun, 20 Oct 2013 16:04:56 -0700 Subject: [PATCH] add evaluation of blocks --- interp.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interp.hs b/interp.hs index d7f71ea..f75ee26 100644 --- a/interp.hs +++ b/interp.hs @@ -63,6 +63,8 @@ eval (StrConst s) = return $ StrV s eval UnitConst = return UnitV +eval (Block body) = foldr1 (>>) $ map eval body + eval (ListConst v) = mapM eval v >>= \xs -> return $ ListV xs