From e8d068f10b5809ca2798c9f3e55fa528d1e68ed4 Mon Sep 17 00:00:00 2001 From: darkf Date: Sat, 19 Oct 2013 02:21:04 -0700 Subject: [PATCH] fix ConsP not catching everything --- interp.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/interp.hs b/interp.hs index 620df2a..e85e4d1 100644 --- a/interp.hs +++ b/interp.hs @@ -75,6 +75,7 @@ patternBindings (ConsP xp xsp) (ListV (x:xs)) = xe <- patternBindings xp x xse <- patternBindings xsp $ ListV xs Just $ M.union xe xse +patternBindings (ConsP _ _) _ = Nothing patternBindings (ListP []) (ListV (x:xs)) = Nothing -- not enough patterns patternBindings (ListP (_:_)) (ListV []) = Nothing -- not enough values