--------------------------
Tidy up arity propagation
--------------------------
Due to excessive complexity, correct arity information was getting
lost on the way to interface files. As a result, a function that had
CPR info __S SLm (say), was getting arity 0, and this confused the (old)
CPR analyser ("lub of function and HasCPR").
I hope this fixes the above error (which showed up somewhere in
compiling Edison), but I'm going to commit it right now anyway.
Meanwhile I'll recompile Edison too.
Details
~~~~~~~
Digging out the rather obscure cause made me tidy up the CgInfo stuff.
The story is now
* The CgInfo field of an Id gets attached to the Id *only* in
the TypeEnv of the ModuleDetails, during CoreTidy.
This ModuleDetails stuff is used
a) to generate the interface file
b) to import into other modules in GHCi
* No CgInfo field is in the CoreBindings which are passed
downsteam to CorePrep and thence CodeGen. Quite right too...
it's the downstream stuff that *generates* the CgInfo.
* But the Arity field *is* now passed on through CoreTidy
(like strictness info) since it is usefully used by CorePrep.
* On the way I simplified the ArityInfo field of an IdInfo
to simply
Arity
instead of
Maybe Arity