newbie: how to expose a package?

With the following .hs: ==<--TestPrettyPrintLeijen.hs--> module TestPrettyPrintLeijen where -- import Text.PrettyPrint.Leijen {- Above import causes error message: TestPrettyPrintLeijen.hs:3:7: Could not find module `Text.PrettyPrint.Leijen': Use -v to see a list of the files searched for. -} import Debug.QuickCheck.Batch {- Above import based on exposed-modules: section of: /usr/lib/ghc-6.12.1/package.conf.d/QuickCheck-1.2.0.0.conf However: ghci TestPrettyPrintLeijen.hs produces error: TestPrettyPrintLeijen.hs:9:7: Could not find module `Debug.QuickCheck.Batch': It is a member of the hidden package `QuickCheck-1.2.0.0'. Use -v to see a list of the files searched for. -} import GHC.Paths {- Above import based on exposed-modules: section of: http://hackage.haskell.org/packages/archive/ghc-paths/0.1.0.8/ghc-paths.caba... -} ==--TestPrettyPrintLeijen.hs--> ghc still fails to find the QuickCheck as shown by: ==<--ghci run--> $ sudo ghc-pkg expose QuickCheck-1.2.0.0 $ ghci TestPrettyPrintLeijen.hs GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. TestPrettyPrintLeijen.hs:9:7: Could not find module `Debug.QuickCheck.Batch': It is a member of the hidden package `QuickCheck-1.2.0.0'. Use -v to see a list of the files searched for. Failed, modules loaded: none. Prelude> ==--ghci run--> How does one enable import of a module from some package? TIA. -regards, Larry

On 10/27/10 13:39, Larry Evans wrote:
With the following .hs:
==<--TestPrettyPrintLeijen.hs--> module TestPrettyPrintLeijen where [snip] import Debug.QuickCheck.Batch {- Above import based on exposed-modules: section of: /usr/lib/ghc-6.12.1/package.conf.d/QuickCheck-1.2.0.0.conf
However: ghci TestPrettyPrintLeijen.hs produces error: TestPrettyPrintLeijen.hs:9:7: Could not find module `Debug.QuickCheck.Batch': It is a member of the hidden package `QuickCheck-1.2.0.0'. Use -v to see a list of the files searched for. -} [snip]
How does one enable import of a module from some package?
[snip] Apparently using uickCheck-1.2.0.0.conf to pick module name is not right. However, using names from: /usr/lib/ghc-6.12.1/package.conf.d/QuickCheck-2.1.0.2.conf and in particular: Test.QuickCheck works. I should have read: http://www.haskell.org/ghc/docs/6.12.2/html/users_guide /packages.html#package-databases more closely, and in particular: You can see GHC's package table by running GHC with the -v flag. which showed: hiding package QuickCheck-1.2.0.0 to avoid conflict with later version QuickCheck-2.1.0.2 Sorry for noise. -regards, Larry
participants (1)
-
Larry Evans