mmm, it seems that the code is searching for the location of a cabal file and uses that as the current directory, assuming all source code is relative to that directory, instead of using the source directive in that cabal file.
Interesting. I have a similar, but worse problem. For me, ':load'ing main.hs would fail to find the imported files. The only thing I appear to be able to :load is files that don't import from local directories.
2009/1/22 Peter Verswyvelen <bugfact@gmail.com>_______________________________________________I have a silly problem.I'm using Emacs with the Haskell mode extension on WindowsI have a source file in sayc:/foo/src/main.hsmain.hs is importing some other modules in that same src directoryWhen I invoke GHCi from within Emacs, the first thing it does is:cd c:/fooand then:load "src/main.hs"
But of course GHCi won't find the imported modules now, since the current directory is wrong.If I type in GHCi:cd src:load "main.hs"then it compiles fine.Does anyone have an idea why Emacs or the Haskell mode is switching to the parent directory of src instead of src itself, and how to fix this?Thanks a lot,Peter
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe