haskell - load and unload modules

in haskell, you can dynamicall add or unload modules in the ghci interactive command prompt. 

 

Load module

Prelude> import Data.Map
Prelude Data.Map>

 or 

Prelude> :m +Data.Map
Prelude Data.Map>

 or simpliy you can remove the '+' symbol 

Prelude> :m Data.Map
Prelude Data.Map>

 

unload module 

to unload module, you can simply do the following.

Prelude Data.Map> :m -Data.Map
Prelude>

 

你可能感兴趣的:(haskell)