diff options
author | Adam Gundry <adam@well-typed.com> | 2015-10-16 13:58:52 +0100 |
---|---|---|
committer | Adam Gundry <adam@well-typed.com> | 2015-10-16 13:58:52 +0100 |
commit | 5a1b4f814f74ec1c48152d97523744518e212777 (patch) | |
tree | 7c2207ecacbd37f12c78dbcf9d4334827164e0fb /compiler/coreSyn/CoreFVs.hs | |
parent | 6757950cdd8bb0af0355539987ee78401a6a8f6b (diff) | |
parent | 808bbdf08058785ae5bc59b5b4f2b04951d4cbbf (diff) | |
download | haskell-wip/orf-reboot.tar.gz |
Merge remote-tracking branch 'origin/master' into wip/orf-rebootwip/orf-reboot
Conflicts:
compiler/rename/RnNames.hs
compiler/typecheck/TcRnMonad.hs
utils/haddock
Diffstat (limited to 'compiler/coreSyn/CoreFVs.hs')
-rw-r--r-- | compiler/coreSyn/CoreFVs.hs | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/compiler/coreSyn/CoreFVs.hs b/compiler/coreSyn/CoreFVs.hs index f5f58dc442..0e5027768a 100644 --- a/compiler/coreSyn/CoreFVs.hs +++ b/compiler/coreSyn/CoreFVs.hs @@ -24,7 +24,7 @@ module CoreFVs ( idUnfoldingVars, idFreeVars, idRuleAndUnfoldingVars, idRuleVars, idRuleRhsVars, stableUnfoldingVars, ruleRhsFreeVars, ruleFreeVars, rulesFreeVars, - ruleLhsOrphNames, ruleLhsFreeIds, exprsOrphNames, + ruleLhsFreeIds, exprsOrphNames, vectsFreeVars, -- * Core syntax tree annotation with free variables @@ -215,21 +215,6 @@ tickish_fvs _ = noVars ************************************************************************ -} --- | ruleLhsOrphNames is used when deciding whether --- a rule is an orphan. In particular, suppose that T is defined in this --- module; we want to avoid declaring that a rule like: --- --- > fromIntegral T = fromIntegral_T --- --- is an orphan. Of course it isn't, and declaring it an orphan would --- make the whole module an orphan module, which is bad. -ruleLhsOrphNames :: CoreRule -> NameSet -ruleLhsOrphNames (BuiltinRule { ru_fn = fn }) = unitNameSet fn -ruleLhsOrphNames (Rule { ru_fn = fn, ru_args = tpl_args }) - = extendNameSet (exprsOrphNames tpl_args) fn - -- No need to delete bndrs, because - -- exprsOrphNames finds only External names - -- | Finds the free /external/ names of an expression, notably -- including the names of type constructors (which of course do not show -- up in 'exprFreeVars'). @@ -423,7 +408,7 @@ idRuleAndUnfoldingVars id = ASSERT( isId id) idUnfoldingVars id idRuleVars ::Id -> VarSet -- Does *not* include CoreUnfolding vars -idRuleVars id = ASSERT( isId id) specInfoFreeVars (idSpecialisation id) +idRuleVars id = ASSERT( isId id) ruleInfoFreeVars (idSpecialisation id) idUnfoldingVars :: Id -> VarSet -- Produce free vars for an unfolding, but NOT for an ordinary |