From 1aad8057a00fd14c261f9c182fca9cd7b9e25ac2 Mon Sep 17 00:00:00 2001 From: darkf Date: Sun, 20 Oct 2013 17:04:12 -0700 Subject: [PATCH] fix list pattern not failing --- interp.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/interp.hs b/interp.hs index 710da04..aa9d484 100644 --- a/interp.hs +++ b/interp.hs @@ -145,6 +145,7 @@ patternBindings (ListP (x:xs)) (ListV (y:ys)) = env <- patternBindings x y env' <- patternBindings (ListP xs) (ListV ys) Just $ M.union env' env +patternBindings (ListP _) _ = Nothing -- not a list -- applies many arguments to a function applyMany :: Value -> [Value] -> InterpState Value