newbie: how to expose a package?

Larry Evans cppljevans at suddenlink.net
Wed Oct 27 14:39:37 EDT 2010


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.cabal
-}

==</--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



More information about the Glasgow-haskell-users mailing list