[Haskell-cafe] Cabal in ghc 6.4.2

allan a.d.clark at ed.ac.uk
Sun Jul 30 10:01:16 EDT 2006

Hello all,

(before I start I should say I'm relatively new (a few months) to 
haskell, so I'm not exactly savvy with the use of the compilers)

I have a problem using the cabal with version 6.4.2 of ghc, the same 
thing occurs with two projects which I wish to compile, I'll use the 
simplest one since the problem seems to be the same in both cases.
The program is a very simple printer thing for haskell the source of 
which you can download at:
(but you probably won't need to, in order to diagnose this problem)

I wish to compile this with the sequence of commands:
./Setup.hs configure --user --prefix=/home/allan/install
./Setup.hs build

this works perfectly on version 6.4 of ghc,
however with version 6.4.2 I get the following error:

haskellprint$ ./Setup.hs  build
Preprocessing executables for haskellprint-0.1...
Building haskellprint-0.1...
Chasing modules from: Main.hs
Could not find module `Text.ParserCombinators.Parsec':
  use -v to see a list of the files searched for
  (imported from ./Parser.hs)

Now if I run
haskellprint$ ./Setup.hs build --verbose

then I can see the command line used to compile the program which is:
/home/allan/install/bin/ghc -Idist/build -o 
dist/build/haskell_print/haskell_print --make -Wall -hide-all-packages 
-i -idist/build/autogen -i. -odir 
dist/build/haskell_print/haskell_print-tmp -hidir 
dist/build/haskell_print/haskell_print-tmp -package base-1.0 Main.hs

If I copy and paste this into the command line and remove the argument [ 
-hide-all-packages ]
then the program compiles fine.
So basically my question is: what am I doing wrong? I assume my problem 
is in the .cabal file, so I include the contents here:
name:           haskellprint
version:        0.1
license:        GPL
license-file:   LICENSE
author:         Allan Clark
maintainer:     a.d.clark at ed.ac.uk
build-depends:  base

executable:     haskell_print
main-is:        Main.hs
ghc-options:    -Wall

-- ghc-options: -fwarn-incomplete-patterns -fwarn-missing-fields
-- ghc-options:    -prof -auto-all -Wall -fglasgow-exts -O 
-funbox-strict-fields -fasm -optl-Wl,-s

thanks in advance for any help.

More information about the Haskell-Cafe mailing list