How to reload a file in ghci without modifying the source code?

Viewed 669

I am using ghc-8.10.2. When I compile a source file (which contains many top bindings and a main function, without a module declaration) into a executable, then type ghci to use the interpreter of ghc, load the source file with the :load filename command. I found that only the main top-binding is visible in ghci environment, other top bindings can be refereed unless I have made some meaningless modification to the source file, and reload it, I have tried to reload the file without making changes in the source file, even with the :reload command, but it doesn't work, so I want to ask if there is a command to force reload a module at any time.

0 Answers
Related