+ = bind [new_id] [x2] (match (App e1 (mkVarArg new_id)) e2) tpl_vars kont subst
+ where
+ new_id = uniqAway (substInScope subst) x2
+ -- This uniqAway is actually needed. Here's the example:
+ -- rule: foldr (mapFB (:) f) [] = mapList
+ -- target: foldr (\x. mapFB k f x) []
+ -- where
+ -- k = \x. mapFB ... x
+ -- The first \x is ok, but when we inline k, hoping it might
+ -- match (:) we find a second \x.