[BUGFIX: if multiple direct calls possible, take this with smallest CallRel
martin.hofmann@uni-bamberg.de**20091007150135] hunk ./src/RuleDevelopment/Matching.hs 55
-                        text "possible!")
-                mapM (makeDirectCall cr n) dcp
+                        text "possible!")                
+                liftM (:[]) $ makeDirectCall cr n (minimumBy (compare `on` fst) dcp) -- take the smallest callrel
hunk ./src/RuleDevelopment/Matching.hs 99
-     tgtrs    <- liftM ((admissible comp scio).(getAll n)) getEvidence
+     tgtrs    <- liftM ((admissibleIOs comp scio).(getAll n)) getEvidence
hunk ./src/RuleDevelopment/Matching.hs 110
-     pats  <-  mapM (testPat n cllrs (lhs.crul $ cr)) $ possiblePats subs tgtlhs
-     return $ map ((,) =<< flip comp (lhs.crul $ cr)) $ catMaybes pats
+     pats  <-  mapM (testPat n cllrs (lhs.crul $ cr)) $ (map . buildPat) subs tgtlhs
+     return $ map ((,) =<< flip comp (lhs.crul $ cr)) $ catMaybes $  pats
hunk ./src/RuleDevelopment/Matching.hs 113
-     admissible cmp io = filter $ (maxcall >=) . flip (on cmp (lhs.crul)) io
-     possiblePats subs = map (buildPat subs)
+     admissibleIOs cmp io = filter $ (maxcall >=) . flip (on cmp (lhs.crul)) io
hunk ./src/RuleDevelopment/Matching.hs 128
-buildPat subs =  map buildPatArg
+buildPat subs tgtlhss =  map buildPatArg tgtlhss