<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 31 October 2017 at 15:42, David Feuer <span dir="ltr"><<a href="mailto:david@well-typed.com" target="_blank">david@well-typed.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Changes in GHC 8.2.1 lead to a lot of recompilation, because GHCi now refuses to load optimized<br>
code unless -fobject-code (and optimization flags) are enabled. I propose the following slight<br>
modification to <a href="https://ghc.haskell.org/trac/ghc/ticket/13604#comment:48" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/<wbr>ghc/ticket/13604#comment:48</a><br>
<br>
1. Optimization flags (except -O0) imply -fobject-code. This ensures that GHC respects optimization flags regardless of --interactive.<br>
<br>
2. Even when -fobject-code is on, :load *M will load M as bytecode. This provides the "escape hatch" from -fobject-code that you need to use debugging features, etc.<br></blockquote><div><br></div><div>Yes, I think this is probably what we want. I'm not sure how smooth it will be to implement though.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3. New -fignore-optim-changes and -fignore-hpc-changes (Phab:D4123) flags should enable users to put together object code and bytecode with diverse optimization levels/options and HPC options while still updating automatically based on source changes and whether profiling is enabled.<br></blockquote><div><br></div><div>As I mentioned on the diff, I think we'll want at least -fignore-optim-changes to be the default, so that GHCi does the expected thing when you have compiled object files.</div><div><br></div><div>Cheers</div><div>Simon</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Does this seem like a reasonable way forward?<br>
<span class="HOEnZb"><font color="#888888"><br>
David Feuer<br>
______________________________<wbr>_________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/ghc-devs</a><br>
</font></span></blockquote></div><br></div></div>