[Haskell-cafe] "Could not find module ... which is hidden" problem

Don Stewart dons at galois.com
Sun Nov 30 02:36:20 EST 2008


lambda-belka:
> 
> Hello!
> 
> ----------------------------START----------------------------------
> $ sudo runghc Setup configure --user
> Configuring HCL-1.2...
> 
> $ sudo runghc Setup build
> Preprocessing library HCL-1.2...
> Preprocessing executables for HCL-1.2...
> Building HCL-1.2...
> 
> HCL.hs:302:7:
>     Could not find module `System.Random':
>       it is a member of package random-1.0.0.1, which is hidden

It is possible you have a very old compiler?

    $ runhaskell Setup.hs configure
    Configuring HCL-1.3...

    $ runhaskell Setup.hs build
    Preprocessing library HCL-1.3...
    Preprocessing executables for HCL-1.3...
    Building HCL-1.3...
    [1 of 1] Compiling System.Console.HCL ( src/System/Console/HCL.hs,
    dist/build/System/Console/HCL.o )
    /usr/bin/ar: creating dist/build/libHSHCL-1.3.a
    [1 of 3] Compiling System.Console.HCL ( src/System/Console/HCL.hs,
    dist/build/hangman/hangman-tmp/System/Console/HCL.o )
    [2 of 3] Compiling Paths_HCL        ( dist/build/autogen/Paths_HCL.hs,
    dist/build/hangman/hangman-tmp/Paths_HCL.o )
    [3 of 3] Compiling Main             ( hangman/Hangman.hs,
    dist/build/hangman/hangman-tmp/Main.o )
    Linking dist/build/hangman/hangman ...

You should have the 'random' package installed. For example, when you
list the installed Haskell packages,

    $ ghc-pkg list random
    /usr/lib/ghc-6.10.1/./package.conf:
        random-1.0.0.1

If that's not present, you can get it from hackage.haskell.org

-- Don


More information about the Haskell-Cafe mailing list