
Hi, I have a few source files in current directory to load as modules of my library in GHCi. How should I do with :load command? I tried ghci>:load a.hs where module a is defined and exported for testing purpose, but failed for a.hs:1:1: File name does not match module name: Saw: `Main' Expected: `a' Failed, modules loaded: none. However, I do not need Main to run for testing. I just want to test exported functions. -- Best Regards Yang Zhao

Hi On Wed, Aug 29, 2012 at 03:07:09PM +0200, Yang wrote:
I have a few source files in current directory to load as modules of my library in GHCi.
When starting ghci, specify the directory to your modules with the -i option. Then, withing GHCI say: ghci> :module +Name.Of.Module ghci> function_from_module HTH Alex
participants (2)
-
Alexander Bernauer
-
Yang