
People, can you, please, explain me how to make the `random' package visible for GHC ? I have * installed haskell-platform-2013.2.0.0, * `made' ghc-7.8.2 from source by ghc-7.6.3, and run make configure under ghc-7.8.2 for my DoCon program. docon.cabal has ---------------------------------------- ... tested-with: GHC build-type: Simple build-depends: base >= 4 && < 5, containers >= 0.3 && <= 0.5.5.1, random >= 1.0 && < 1.2 . exposed-modules: ... extensions: TypeSynonymInstances UndecidableInstances FlexibleContexts FlexibleInstances MultiParamTypeClasses OverlappingInstances RecordWildCards NamedFieldPuns DoAndIfThenElse ... ----------------------------------------- make configure reports runghc Setup.hs configure --ghc --prefix=/home/mechvel/docon/2.12/docon/source/inst -v Configuring docon-2.12... Setup.hs: At least the following dependencies are missing: random >=1.0 && <1.2 I do cabal install random, and now ghc-pkg list shows ------------------------------------- /home/mechvel/ghc/7.8.2/inst0/lib/ghc-7.8.2/package.conf.d Cabal-1.18.1.3 ... containers-0.5.5.1 ... ghc-7.8.2 ... unix-2.7.0.1 /home/mechvel/.ghc/x86_64-linux-7.8.2/package.conf.d random-1.0.1.1 -------------------------------------- But make configure still does not find random. The Haskell Platform is installed in the system area, ghc-7.8.2 and random-1.0.1.1 are installed in my home. Maybe, I need to run `register random' with some appropriate arguments? Can you, please, advise? Thanks, ------ Sergei

On Tuesday 22 April 2014, 22:53:36, Sergei Meshveliani wrote:
People,
can you, please, explain me how to make the `random' package visible for GHC ?
It is visible to GHC, but `cabal install random` installed the package into the user database:
and now ghc-pkg list shows
------------------------------------- /home/mechvel/ghc/7.8.2/inst0/lib/ghc-7.8.2/package.conf.d ...
/home/mechvel/.ghc/x86_64-linux-7.8.2/package.conf.d random-1.0.1.1 --------------------------------------
whereas
make configure
reports
runghc Setup.hs configure --ghc
by default only looks into the global package database. If you don't want to use the cabal tool to install your DoCon and stick with the `runghc Setup.hs ...` way, you have the choice to either - pass the --user flag to `runghc Setup.hs configure` so that it uses also the user package database where your random package sits (then DoCon is also installed for the user and not globally), or - install random in the global package database, `cabal install --global random` so that `runghc Setup.hs ...` finds the package in the global DB. Cheers, Daniel
participants (2)
-
Daniel Fischer
-
Sergei Meshveliani