fix ConsP not catching everything

This commit is contained in:
darkf 2013-10-19 02:21:04 -07:00
parent f61c7fb87d
commit e8d068f10b
1 changed files with 1 additions and 0 deletions

View File

@ -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