:type-at/:all-types and :r don't mix
Steps to reproduce:
x = ()in test.hs.
- Start ghci.
- Turn on collection with :set +c.
- Load the file with :l test.hs.
- Observe the following output from :all-types
test.hs:(1,1)-(1,2): () test.hs:(1,5)-(1,7): ()
- While ghci is still open, modify the file to say
x = True.
- In the same ghci session as before, reload with :r, or load the file again with :l test.hs, chef's choice.
- Run :all-types again.
After step 8, ghci prints the exact same thing as before, indicating that both sides of the equation have type
(). It should instead update the source spans and types to match the file, reporting
Bool instead of
(1,5)-(1,9) for the second span.
Manually exiting and restarting ghci appears to be the only way to freshen the collected type information.