fix ConsP not catching everything
This commit is contained in:
parent
f61c7fb87d
commit
e8d068f10b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue