GHCi recompilation avoidance UI
david at well-typed.com
Tue Oct 31 15:42:11 UTC 2017
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.
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.
Does this seem like a reasonable way forward?
More information about the ghc-devs