I've just installed EclipseFP and now I am trying to load a module in GHCi. The problem is that GHCi doesn't load libraries installed by cabal, referenced by my module. After I set -v in GHCi and ran :r, it looks like GHCi is only looking for libraries that are installed globally, not libraries that are installed for the local user:
Could not find module `Text.ParserCombinators.Parsec'
There are files missing in the `parsec-3.1.3' package,
try running 'ghc-pkg check'.
Locations searched:
Text/ParserCombinators/Parsec.hs
Text/ParserCombinators/Parsec.lhs
/Library/Haskell/ghc-7.6.3/lib/parsec-3.1.3/lib/Text/ParserCombinators/Parsec.hi
However, when I'm running GHCi in terminal or via Haskell-Mode in emacs, everything works just fine!
I am wondering if there is something wrong with my configuration in EclipseFP or if I can force GHCi to search for user local modules as well.
By the way, I have already tried -i option to pass the local search path to CHCi
-i~/Library/Haskell/ghc-7.6.3/lib/
but apparently, GHCi is only looking for source files (e.g., Parsec.hs and Parsec.lhs) but not interface files (Parsec.hi) in the specified path.
I would much appreciate it if you can help me experience the joy of Haskell programming in Eclipse!
Thanks!
In Eclipse, a run configuration has been created for your GHCi run on your module. This will give you the exact parameters that are being passed to GHCi. It should reference the user package db and all the packages your module needs (make sure the proper dependencies are in the Cabal file). EclipseFP installs packages in the user db by default, so normally this works fine. You should not need to add specific directories to GHCi in EclipseFP.