Bug with non-strict unification
Consider the definitions:
dups1 :: [Bool] -> Bool
dups1 xs | xs =:= _ ++ [x] ++ _ ++ [x] ++ _ = x where x free
dups2 :: [Bool] -> Bool
dups2 (_ ++ [x] ++ _ ++ [x] ++ _) = x
If applied to total data terms, both should yield the same results. However, the non-strict unification yields too many results:
Test> dups1 [False,True,False]
False
Test> dups2 [False,True,False]
False
False
True