On Fri, 11 Feb 2022, Simon Peyton Jones wrote:
A `ModDetails` gives the type signatures for everything, but no actual code.
For
example if you have `f :: Int -> Int` in the `md_types`, the `ModDetails`
doesn't
include the binding `f = rhs` for `f`.
Yes, this on its own makes sense.
Presumably you must also be generating these bindings (in a `ModGuts` perhaps?)
and
generating code for them that will ultimately be linked into the program to run.
I am not generating a `ModGuts`. My intention is to use these instances
from "normal" (hand-written) source input to GHC. GHC should use the
`DFunUnfolding`s during specialization to get rid of overloaded code,
after which I should have inlined-due-to-specialization versions of my
definitions.
Well, put the `DFunId` binding in the same place, alongside `f`.
For the sake of argument, suppose that I did make a `ModGuts`. In that
case, what kind of internal state would be updated based on the contents
of that `ModGuts` such that references to my `DFunId` would work?_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs