Commit b4d54590 authored by Simon Peyton Jones's avatar Simon Peyton Jones

More misc comments

... plus, reorder equations in toIfaceVar to improve
legibility.  No change in behaviour.
parent 577399c0
......@@ -1183,7 +1183,7 @@ proxyName = mkWiredInIdName gHC_PRIM (fsLit "proxy#") proxyHash
lazyIdName, oneShotName, noinlineIdName :: Name
lazyIdName = mkWiredInIdName gHC_MAGIC (fsLit "lazy") lazyIdKey lazyId
oneShotName = mkWiredInIdName gHC_MAGIC (fsLit "oneShot") oneShotKey oneShotId
noinlineIdName = mkWiredInIdName gHC_MAGIC (fsLit "noinline") noinlineIdKey noinlineId
noinlineIdName = mkWiredInIdName gHC_MAGIC (fsLit "noinline") noinlineIdKey noinlineId
------------------------------------------------
proxyHashId :: Id
......@@ -1431,9 +1431,8 @@ a little bit of magic to optimize away 'noinline' after we are done
running the simplifier.
'noinline' needs to be wired-in because it gets inserted automatically
when we serialize an expression to the interface format, and we DON'T
want use its fingerprints.
when we serialize an expression to the interface format. See
Note [Inlining and hs-boot files] in ToIface
Note [The oneShot function]
~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
......@@ -535,14 +535,17 @@ mkIfaceApps f as = foldl (\f a -> IfaceApp f (toIfaceExpr a)) f as
---------------------
toIfaceVar :: Id -> IfaceExpr
toIfaceVar v
| Just fcall <- isFCallId_maybe v = IfaceFCall fcall (toIfaceType (idType v))
-- Foreign calls have special syntax
| isBootUnfolding (idUnfolding v)
= IfaceApp (IfaceApp (IfaceExt noinlineIdName) (IfaceType (toIfaceType (idType v))))
= -- See Note [Inlining and hs-boot files]
IfaceApp (IfaceApp (IfaceExt noinlineIdName)
(IfaceType (toIfaceType (idType v))))
(IfaceExt name) -- don't use mkIfaceApps, or infinite loop
-- See Note [Inlining and hs-boot files]
| isExternalName name = IfaceExt name
| otherwise = IfaceLcl (getOccFS name)
| Just fcall <- isFCallId_maybe v = IfaceFCall fcall (toIfaceType (idType v))
-- Foreign calls have special syntax
| isExternalName name = IfaceExt name
| otherwise = IfaceLcl (getOccFS name)
where name = idName v
......
......@@ -2295,6 +2295,9 @@ Core Lint never expects to find an *occurrence* of an Id marked
as Dead, so we must zap the OccInfo on cb before making the
binding x = cb. See Trac #5028.
NB: the OccInfo on /occurrences/ really doesn't matter much; the simplifier
doesn't use it. So this is only to satisfy the perhpas-over-picky Lint.
Historical note [no-case-of-case]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We *used* to suppress the binder-swap in case expressions when
......
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