[in place evaluation of IOs added, both in rules and inIOData
martin.hofmann@uni-bamberg.de**20090610075748] hunk ./src/Data/IgorMonad.hs 9
-    tick, loopCount, hypoCount, isDebug, maxLoops, recArgComp, background, 
-    targets, addIO, breakupM, fuseM, coverAll,
+    tick, loopCount, hypoCount, isDebug, maxLoops, getPatComparison, background, 
+    targets, addIO, breakupM, fuseM, coverAll, evalIO,
hunk ./src/Data/IgorMonad.hs 27
+import Syntax.Terms
hunk ./src/Data/IgorMonad.hs 30
+import Data.Function
hunk ./src/Data/IgorMonad.hs 152
-
+evalIO :: Name -> LHS -> IM (Maybe RHS)
+evalIO n e = do
+    ios <- liftM (getAll n) getEvidence
+    return $ msum $ map ((matchEval e).crul) ios
+    
hunk ./src/Data/Rules.hs 8
-    hasVarAt, hasCtorAt,
+    hasVarAt, hasCtorAt, matchesLhs, matchesRhs, matchEval,
hunk ./src/Data/Rules.hs 39
-
+import Control.Monad.Error
hunk ./src/Data/Rules.hs 184
+matchEval :: LHS -> Rule -> Maybe TExp
+matchEval args r = noLog $ 
+    matchesWithSubsLs args (lhs r) >>= flip apply (rhs r)
+
+matchesLhs :: Rule -> Rule -> LM (Substitution TExp)
+matchesLhs = matchesWithSubsLs `on` lhs
+
+matchesRhs :: Rule -> Rule -> LM (Substitution TExp)
+matchesRhs = matchesWithSubs `on` rhs
+