fix 'x::xs' pattern not working on one-element lists
This commit is contained in:
parent
9dc145c08f
commit
3be45c44e5
|
@ -146,7 +146,6 @@ patternBindings UnitP UnitV = Just M.empty
|
||||||
patternBindings UnitP _ = Nothing
|
patternBindings UnitP _ = Nothing
|
||||||
|
|
||||||
patternBindings (ConsP x (ListP [])) (ListV (y:[])) = patternBindings x y
|
patternBindings (ConsP x (ListP [])) (ListV (y:[])) = patternBindings x y
|
||||||
patternBindings (ConsP _ _) (ListV (_:[])) = Nothing
|
|
||||||
patternBindings (ConsP xp xsp) (ListV (x:xs)) =
|
patternBindings (ConsP xp xsp) (ListV (x:xs)) =
|
||||||
do
|
do
|
||||||
xe <- patternBindings xp x
|
xe <- patternBindings xp x
|
||||||
|
|
Loading…
Reference in New Issue