ghci not loading function from file
问题 In test.hs, I have: doubleMe x = x + x In ghci, I type: Prelude> :l test [1 of 1] Compiling Main ( test.hs, interpreted ) Ok, modules loaded: Main. *Main> doubleMe 9 <interactive>:1:0: Not in scope: `doubleMe' *Main> Why? How to fix? 回答1: Are you sure that you're loading the right test.hs? Maybe you're in the wrong directory. Or maybe you didn't save test.hs after adding the definition of doubleMe. 回答2: My guess is that you have defined a main function in your source file. If you have defined