After updating from ghc 7.6 to 7.10 it seems you can't :m [Module]
or ghci> import [Module]
where [Module.hs] is your hand-written module file that resides in current working directory.
It seems ghci searches only for modules that are part of haskell standard library and modules that are globally installed via cabal. (you can still :load [Module.hs]
in ghci prompts though)
I think it's kinda annoying since you can't test whether my module definition is correct by directly importing them from ghci. Is there any switch or configuration that I can fiddle with, so I can tell where my haskell working dirctory is to ghci?
.cabal
into the folder exposing your module and it should work - Random Dev:load
works, why not just use that? - sclv:m
orimport
on "local" modules, it's just that now all modules must be loaded before calling either of these commands on them (I believe it would previously load the module automatically if it wasn't loaded?). So just do:l Module.hs ; :m + Module
. - user2407038:l Module1.hs Module2.hs ...
, but onlyModule1.hs
is imported. You have to:m +Module2 ...
to import the rest. - crockeea:load
is slightly different, it loads all functions in the file, not just the ones exported by the module (i.e.module Foo (a,b,c) where...
). - xdavidliu