Fix #15369: GHCi doesn't honor :set +c when loading for a second time
authorRoland Senn <rsx@bluewin.ch>
Sat, 8 Dec 2018 04:22:40 +0000 (23:22 -0500)
committerBen Gamari <ben@smart-cactus.org>
Sat, 8 Dec 2018 04:22:50 +0000 (23:22 -0500)
commit57c9b1ae4cafd0ee763451f2d4bc10220eef9689
tree722f03f041237dd4664c724a516fa3222fcadebb
parentc5ced679a6f5421eb53acf1fd1d212088145c971
Fix #15369: GHCi doesn't honor :set +c when loading for a second time

The decision to (re)collect the type info for a (re)loaded module is
now taken only by comparing the file timestamps of the .hs file of the
module. (Or form the .o file if the .hs file is missing).
If the file timestamp changes, we (re)collect the type info.
The timestamp of the processing time of the last collect is no longer
used.

Test Plan: make test TEST=T15369

Reviewers: alanz, hvr, monoidal, osa1, thomie, bgamari, tdammers

Reviewed By: tdammers

Subscribers: rwbarton, carter

GHC Trac Issues: #15369

Differential Revision: https://phabricator.haskell.org/D5376
ghc/GHCi/UI/Info.hs
testsuite/tests/ghci/should_run/T15369.hs [new file with mode: 0644]
testsuite/tests/ghci/should_run/T15369.script [new file with mode: 0644]
testsuite/tests/ghci/should_run/T15369.stdout [new file with mode: 0644]
testsuite/tests/ghci/should_run/all.T