[Haskell-beginners] How to load multiple source files in GHCi?

Yang register.battlenet.com.cn at gmail.com
Wed Aug 29 15:07:09 CEST 2012


     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

     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

More information about the Beginners mailing list