Haskell – How to go back to prelude> in ghci

haskell

When I :load a Haskell script into GHCi, it changes the prompt from Prelude> to *Main>. After I'm done with this script, how can I go back to the Prelude> prompt? There seems to be no documentation regarding this.

Best Answer

Try using the :m command. It should unload all the modules.

This is short for :module which sets the current context. You can also load arbitrary modules this way:

Prelude> :m Data.List Control.Applicative
Prelude Data.List Control.Applicative> :m
Prelude>
Related Topic