Dumping GHC Core when mixin instantiates indefinite module
I'm using mixins in a cabal file to instantiate a indefinite module, and I'd like to be able to see the optimized GHC core. Putting the following in my cabal file does not work:
mixins: sockets-stream-send (Foo.Indefinite as Foo.Text) requires (...) ghc-options: -O2 -ddump-splices -ddump-to-file
That is to say that after building, there is no file created that corresponds to the optimized GHC core for
I'm not exactly sure what to propose to fix this. The interaction between ghc and cabal in huge when backpack is in play. I'm not sure if a new flag is needed or if something in cabal needs to change (or both). Also, since mixins can choose module names that do not correspond to files in the filesystem, it's possible to for the same module to be created twice by internal libraries of the same package. Perhaps when dumping core to a file, cabal should use the internal library names as a prefix to prevent such clashes. But it needs to way to tell GHC about such a prefix.