[fix use of unbound TVarEs in Igor2.RuleDevelopment.Matching.abduceIO
Helmut Grohne <grohne@cs.uni-bonn.de>**20150115100222
 Ignore-this: 863b7c799f831fcffb6b914d3359d19b
 
 The function would create a substitution s, such that:
 
     apply s (rhs (crul tgt)) == rhs (crul cll)
 
 This substitution is extended to s' by mapping unaffectedvars to wildcards and
 then applied to (lhs (crul tgt)). Unfortunately, variables could only be
 considered unaffected if they occurred in (lhs (crul cll)), so the resulting
 rules could use unbound TVarEs in their rhs.
 
 The domain of the substitution s' should include all variables in (lhs (crul
 tgt)) however. So rather than starting unaffectedvars out from cllvars, we need
 to start with tgtvars!
 
 Even though this change does not affect any of the present tests, it does make
 generalizing
 
     put_last :: [a] -> a -> [a]
     put_last [a']           a = [a]
     put_last [a, b']        b = [a, b]
     put_last [a, b, c']     c = [a, b, c]
     put_last [a, b, c, d']  d = [a, b, c, d]
 
 with background knowledge
 
     init :: [a] -> [a]
     init []     = []
     init [a]    = []
     init (x:xs) = x:init xs
 
 and
 
     snoc :: a -> [a] -> [a]
     snoc x []     = [x]
     snoc x (y:ys) = y:snoc x ys
 
 work. Whereas it would never finish before this change.
] hunk ./src/Igor2/RuleDevelopment/Matching.hs 239
-                Just s   -> do let cllvars = nub $ concatMap getVars (lhs.crul $ cll)
-                               let bthvars = nub (getVars (rhs.crul $ cll)) `intersect` nub (getVars (rhs.crul $ tgt))
-                               let unaffectedvars = (cllvars \\ bthvars) \\ map (\(n,t) -> toVar t n) (assocs s)
+                Just s   -> do let tgtvars = nub $ concatMap getVars (lhs (crul tgt))
+                               let bthvars = nub (getVars (rhs (crul cll))) `intersect` nub (getVars (rhs (crul tgt)))
+                               let unaffectedvars = (tgtvars \\ bthvars) \\ map (\(n,t) -> toVar t n) (assocs s)