Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

ghci should have stricter use of memory with module reloading
After loading modules, ghci tends to retain memory allocated for the loaded modules after reloading. In my work project, when I change a module which is at the top of the dependency and therefore forces recompilation of all the previously modules when realoding, the live data and the heap space allocated are almost doubled. The next reloading does not cause the tripled live data, so it seems like a one-time redundancy issue in ghci module loading/unloading. If I unload all the module and load again, it does not show the retaining behavior (I also checked the unloading is done completely with -fghci-leak-check), so it is more related to reloading process. I attached the comparison of the heap profile. The first one is the data from running ghci with loading modules and reloading, and the second one is from running ghci with loading modules and unloading (:l) and loading the modules again. ![Screen_Shot_2022-11-28_at_6.41.24_PM](/uploads/c74489ea2440078fa272b3e671f38d79/Screen_Shot_2022-11-28_at_6.41.24_PM.png) ![Screen_Shot_2022-11-29_at_7.57.04_AM](/uploads/6968b5ac17955808bbdc28b078947109/Screen_Shot_2022-11-29_at_7.57.04_AM.png) This is on GHC 9.4.2.
issue