Make substitute work for type variables as well.
[matthijs/master-project/cλash.git] / NormalizeTools.hs
index 58432d3eae50f40816c09d5385fc62a33d5de798..923b54567767e68d7ccc68bfda2c0db9c70114f2 100644 (file)
@@ -168,7 +168,7 @@ mkUnique = Trans.lift $ do
 -- given expression.
 substitute :: [(CoreBndr, CoreExpr)] -> CoreExpr -> CoreExpr
 substitute replace expr = CoreSubst.substExpr subs expr
-    where subs = foldl (\s (b, e) -> CoreSubst.extendIdSubst s b e) CoreSubst.emptySubst replace
+    where subs = foldl (\s (b, e) -> CoreSubst.extendSubst s b e) CoreSubst.emptySubst replace
 
 -- Run a given TransformSession. Used mostly to setup the right calls and
 -- an initial state.