BufBills
BufBills

Reputation: 8103

How to quit one level of imported package

In haskell interactive mode, ghci.

If I have imported one package, such as: import Data.List

I went to Prelude Data.List>

My question is, how to get back to "Prelude"

Thanks,

Upvotes: 2

Views: 96

Answers (1)

J. Abrahamson
J. Abrahamson

Reputation: 74334

GHCi "meta" commands begin with :. One of them, :modules (:m for short) lets you modify the currently loaded modules. :m by itself will reset all of the loaded modules returning you to Prelude>.

You can also use :m +MODULE to "add" the module MODULE or :m -MODULE to remove the module MODULE.

Upvotes: 7

Related Questions