Commit 3cfb12d8 authored by Joachim Breitner's avatar Joachim Breitner

In Exitify, zap idInfo of abstracted variables (fixes #15005)

as helpfully outlined by SPJ.

This commit copies a small bit code from `SetLevels` which could
reasonably be put in `Id` as `zapAllIdinfo`; I did not do this to make
merging this commmit into `ghc-8.4` easier.

If this commit gets merged, then presumably after commit
3f59d380 (test case) and
ae0cff0a (other fixes to Exitify.hs).

Differential Revision: https://phabricator.haskell.org/D4582
parent 7bb7f991
......@@ -175,7 +175,14 @@ exitify in_scope pairs =
is_interesting = anyVarSet isLocalId (fvs `minusVarSet` mkVarSet captured)
-- The possible arguments of this exit join point
abs_vars = sortQuantVars $ filter (`elemVarSet` fvs) captured
abs_vars =
map zap $
sortQuantVars $
filter (`elemVarSet` fvs) captured
-- cf. SetLevels.abstractVars
zap v | isId v = setIdInfo v vanillaIdInfo
| otherwise = v
-- We cannot abstract over join points
captures_join_points = any isJoinId abs_vars
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment