The Text.ParserCombinators.Parsec modules are in the parsec module.
build-depends: base
Add parsec here:
build-depends: base, parsec
The reason it works when you run it without -hide-all-packages is that
by default for convenience all packages are 'exposed'. That is they can
be used without explicitly having to specify them. However it was felt
that for distributing software, which is one of the main purposes of
Cabal, one should be fully explicit about the dependencies so that users
compiling on other machines know exactly what packages needed and don't
end up with mysterious import errors.
Yip this sounds like a good policy to me too.
Now it's true that Cabal could be a bit cleverer here and warn you
before it even starts compiling that you have not specified all the
right packages in the build-depends. At the moment however Cabal doesn't
have a proper imports chaser so it can't do this.
Duncan
Thanks very much for the response, however, adding "parsec" to the
build-depends of the .cabal file now causes a slightly different error,
and in fact this is the same error I get with my other project:
haskellprint$ ./Setup.hs build
Preprocessing executables for haskellprint-0.1...
Building haskellprint-0.1...
Chasing modules from: Main.hs
Could not find module `Char':
use -v to see a list of the files searched for
(imported from ./Parser.hs)
haskellprint$
so basically I was expecting 'Char' to be in the 'base' package, I guess
this is wrong?
thanks again.
allan
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe