[BUGFIX: Polymorphism caused too many matchings
martin.hofmann@uni-bamberg.de**20100111084606
 Functions as 'last' caused too many matchings due to polymorphic variables on rhs. Allow only direct matching for those functions.
] hunk ./src/Igor2/RuleDevelopment/Matching.hs 74
-
-     ios    <-  makeIOMatrix tgtrs o cllrs
-
-     maybe cancel proceed ios
+     
+     -- This is important. due to polymorphism functions like 'last' in 
+     -- background knowledge would match everything. For those functions only 
+     -- direct match should be allowed.
+     if all (isVar . rhs . crul) cllrs || all (isVar . rhs . crul) tgtrs then stop
+      else do ios    <-  makeIOMatrix tgtrs o cllrs
+              maybe cancel proceed ios
hunk ./src/Igor2/RuleDevelopment/Matching.hs 88
-     -- sequence computes all possibilities taking one from each list                    
+     -- sequence computes all possibilities taking one from each list
+     stop = llogIN (text "Caller or Target has variable on rhs. Would compute too many matchings") >>
+            return []                    
hunk ./src/Igor2/RuleDevelopment/Matching.hs 162
-    llogDE (text "Call added:" <^> (pretty cr'))
+    llogDE (text "Call possible:" <^>  (pretty cr') <+> (pretty call))