If you have loaded a file into GHCi (e.g. using :l filename.hs
) and you have changed the file in an editor outside of GHCi you must reload the file with :r
or :reload
in order to make use of the changes, hence you don't need to type again the filename.
ghci> :r
OK, modules loaded: Main.
ghci> :reload
OK, modules loaded: Main.