GHCi recompilation avoidance UI

Simon Marlow marlowsd at gmail.com
Thu Nov 2 10:21:07 UTC 2017


On 31 October 2017 at 15:42, David Feuer <david at well-typed.com> wrote:

> Changes in GHC 8.2.1 lead to a lot of recompilation, because GHCi now
> refuses to load optimized
> code unless -fobject-code (and optimization flags) are enabled. I propose
> the following slight
> modification to https://ghc.haskell.org/trac/ghc/ticket/13604#comment:48
>
> 1. Optimization flags (except -O0) imply -fobject-code. This ensures that
> GHC respects optimization flags regardless of --interactive.
>
> 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.
>

Yes, I think this is probably what we want. I'm not sure how smooth it will
be to implement though.


> 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.
>

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.

Cheers
Simon



>
> Does this seem like a reasonable way forward?
>
> David Feuer
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20171102/d1c5de37/attachment-0001.html>


More information about the ghc-devs mailing list