@@ -60,7 +60,7 @@ genClauses fc n xs given
60 _ -> repeat (pexp Placeholder)
60 _ -> repeat (pexp Placeholder)
61 let tryclauses = mkClauses parg all_args
61 let tryclauses = mkClauses parg all_args
62 logLvl 2 $ show (length tryclauses) ++ " initially to check"
62 logLvl 2 $ show (length tryclauses) ++ " initially to check"
63− let new = mnub i $ filter (noMatch i) tryclauses
63+ let new = filter (noMatch i) (mnub i tryclauses)
64 logLvl 1 $ show (length new) ++ " clauses to check for impossibility"
64 logLvl 1 $ show (length new) ++ " clauses to check for impossibility"
65 logLvl 5 $ "New clauses: \n" ++ showSep "\n" (map (showImp True) new)
65 logLvl 5 $ "New clauses: \n" ++ showSep "\n" (map (showImp True) new)
66-- ++ " from:\n" ++ showSep "\n" (map (showImp True) tryclauses)
66-- ++ " from:\n" ++ showSep "\n" (map (showImp True) tryclauses)
@@ -75,10 +75,15 @@ genClauses fc n xs given
76 mnub i [] = []
76 mnub i [] = []
77 mnub i (x : xs) =
77 mnub i (x : xs) =
78+ let xs' = filter (\t -> case matchClause i x t of
80+ Left _ -> True) xs in
78− if (any (\t -> case matchClause i x t of
83+-- if (any (\t -> case matchClause i x t of
79− Right _ -> True
84+-- Right _ -> True
80− Left _ -> False) xs) then mnub i xs
85+-- Left _ -> False) xs) then mnub i xs
81− else x : mnub i xs
86+-- else x : mnub i xs
83 noMatch i tm = all (\x -> case matchClause i (delab' i x True) tm of
88 noMatch i tm = all (\x -> case matchClause i (delab' i x True) tm of
84 Right _ -> False
89 Right _ -> False