Skip to content

ghci always recompiles source files even if there are .o files

In 8.2.1-rc1 loading a file compiled with -O2 into ghci results in ghci recompiling the file into interpreted byte code. In 8.0.2 it simply loads the compiled object file.

  1. 2.1
 ghc -dynamic -O2 eh2.hs
[1 of 1] Compiling Main             ( eh2.hs, eh2.o )
Linking eh2 ...
bash-3.2$ ghci -ignore-dot-ghci
GHCi, version 8.2.0.20170404: http://www.haskell.org/ghc/  :? for help
Prelude> :load eh2
[1 of 1] Compiling Main             ( eh2.hs, interpreted ) [flags changed]
Ok, modules loaded: Main.
  1. 0.2
 ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.0.2
bash-3.2$ pwd
/Users/gcolpitts/haskell
bash-3.2$ ghc -dynamic -O2 eh2.hs
[1 of 1] Compiling Main             ( eh2.hs, eh2.o )
Linking eh2 ...
bash-3.2$ ghci -ignore-dot-ghci
GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
Prelude> :load eh2
Ok, modules loaded: Main (eh2.o).
Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited by george.colpitts
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information