"Could not find module ... which is hidden" problem

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 $ sudo ghc-pkg expose random Saving old package config file... done. Writing new package config file... done. $ 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 ---------------------THE-END---------------------------------------- Perhaps, i'm 1000th, who asks how to solve this. Sorry that didn't search better, but it's really tiring for a newby. :-( [ http://www.haskell.org/haskellwiki/Upgrading_packages/Updating_to_GHC_6.8 Here ] found something, which maybe called "a gentle explaination" of what's going on. I have ghc ver: 6.8.2, base ver: 3.0.1.0. So there are 2 questions of mine: (1) Is there any centralized and well organized Haskell Knowledge Base, where it would be much easier to find solutions for "popular" problems? Anybody, please, your recommendations. (2) As for the topic: the only option for me would be obtaining older GHC (base?) - is that correct? So that require me reinstalling every Haskell package I have installed so far? Thanks in advance. -- View this message in context: http://www.nabble.com/%22Could-not-find-module-...-which-is-hidden%22-proble... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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

On Sat, Nov 29, 2008 at 11:22 PM, 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
$ sudo ghc-pkg expose random Saving old package config file... done. Writing new package config file... done.
$ 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
---------------------THE-END----------------------------------------
Perhaps, i'm 1000th, who asks how to solve this. Sorry that didn't search better, but it's really tiring for a newby. :-( [ http://www.haskell.org/haskellwiki/Upgrading_packages/Updating_to_GHC_6.8 Here ] found something, which maybe called "a gentle explaination" of what's going on. I have ghc ver: 6.8.2, base ver: 3.0.1.0.
So there are 2 questions of mine: (1) Is there any centralized and well organized Haskell Knowledge Base, where it would be much easier to find solutions for "popular" problems? Anybody, please, your recommendations. (2) As for the topic: the only option for me would be obtaining older GHC (base?) - is that correct? So that require me reinstalling every Haskell package I have installed so far?
Thanks in advance. -- View this message in context: http://www.nabble.com/%22Could-not-find-module-...-which-is-hidden%22-proble... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Is the "random" package in the build-depends of your cabal file? If not, that's why it's hidden. Cabal hides all of the packages that aren't listed in build-depends so that you can't accidentally depend on something that you don't list. Hope that helps. Alex

alexander.dunlap:
Is the "random" package in the build-depends of your cabal file? If not, that's why it's hidden. Cabal hides all of the packages that aren't listed in build-depends so that you can't accidentally depend on something that you don't list.
Yes, looks like he was using HCL 1.2 -- well spotted! Try building HCL 1.3 http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HCL
participants (3)
-
Alexander Dunlap
-
Belka
-
Don Stewart