[Prelude System.Directory B Data.Monoid Control.Monad Control.Applicative Control.Monad.Trans.Writer.Strict Data.Char Data.List> :load "/Users/alfred/Documents/App Development/Haskell/Examples/StateMonadEx.hs" [1 of 1] Compiling Main ( /Users/alfred/Documents/App Development/Haskell/Examples/StateMonadEx.hs, interpreted )
/Users/alfred/Documents/App Development/Haskell/Examples/StateMonadEx.hs:28:1: error: Could not find module ‘System.Random’ Use -v to see a list of the files searched for. | 28 | import System.Random | ^^^^^^^^^^^^^^^^^^^^ Failed, 0 modules loaded.
Yet when I run these ghc-pkg commands, here is what shows up: alfreds-mini:bin alfred$ ghc-pkg list WARNING: cache is out of date: /Library/Frameworks/GHC.framework/Versions/8.2.1-x86_64/usr/lib/ghc-8.2.1/package.conf.d/package.cache ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix. /Library/Frameworks/GHC.framework/Versions/8.2.1-x86_64/usr/lib/ghc-8.2.1/package.conf.d Cabal-2.0.0.2 GLURaw-2.0.0.3 GLUT-2.7.0.12 HTTP-4000.3.7 HUnit-1.6.0.0 ObjectName-1.1.0.1 OpenGL-3.0.2.0 OpenGLRaw-3.2.5.0 QuickCheck-2.10.0.1 StateVar-1.1.0.4 array-0.5.2.0 async-2.1.1.1 attoparsec-0.13.2.0 base-4.10.0.0 binary-0.8.5.1 bytestring-0.10.8.2 call-stack-0.1.0 case-insensitive-1.2.0.10 containers-0.5.10.2 deepseq-1.4.3.0 directory-1.3.0.2 fgl-5.6.0.0 filepath-1.4.1.2 fixed-0.2.1.1 ghc-8.2.1 ghc-boot-8.2.1 ghc-boot-th-8.2.1 ghc-compact-0.1.0.0 ghc-prim-0.5.1.0 ghci-8.2.1 half-0.2.2.3 hashable-1.2.6.1 haskeline-0.7.4.0 haskell-src-1.0.2.0 hoopl-3.10.2.2 hpc-0.6.0.3 hscolour-1.24.1 html-1.0.1.2 integer-gmp-1.0.1.0 integer-logarithms-1.0.2 mtl-2.2.1 network-2.6.3.2 network-uri-2.6.1.0 parallel-3.2.1.1 parsec-3.1.11 pretty-1.1.3.3 primitive-0.6.2.0 process-1.6.1.0 random-1.1 regex-base-0.93.2 regex-compat-0.95.1 regex-posix-0.95.2 rts-1.0 scientific-0.3.5.1 split-0.2.3.2 stm-2.4.4.1 syb-0.7 template-haskell-2.12.0.0 terminfo-0.4.1.0 text-1.2.2.2 tf-random-0.5 time-1.8.0.2 transformers-0.5.2.0 unix-2.7.2.2 unordered-containers-0.2.8.0 vector-0.12.0.1 xhtml-3000.2.2 zlib-0.6.1.2 alfreds-mini:bin alfred$ ghc-pkg field random exposed-modules WARNING: cache is out of date: /Library/Frameworks/GHC.framework/Versions/8.2.1-x86_64/usr/lib/ghc-8.2.1/package.conf.d/package.cache ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix. exposed-modules: System.Random alfreds-mini:bin alfred$ ghc-pkg recache ghc-pkg: /Library/Frameworks/GHC.framework/Versions/8.2.1-x86_64/usr/lib/ghc-8.2.1/package.conf.d/package.cache: you don't have permission to modify this file alfreds-mini:bin alfred$ ghc-pkg expose random ghc-pkg: /Library/Frameworks/GHC.framework/Versions/8.2.1-x86_64/usr/lib/ghc-8.2.1/package.conf.d/: openBinaryTempFileWithDefaultPermissions: permission denied (Permission denied) alfreds-mini:bin alfred$ ghc-pkg find-module System.Random WARNING: cache is out of date: /Library/Frameworks/GHC.framework/Versions/8.2.1-x86_64/usr/lib/ghc-8.2.1/package.conf.d/package.cache ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix. /Library/Frameworks/GHC.framework/Versions/8.2.1-x86_64/usr/lib/ghc-8.2.1/package.conf.d random-1.1 /Users/alfred/.ghc/x86_64-darwin-8.2.1/package.conf.d (no packages) alfreds-mini:bin alfred$
what gives? Do I have to recache something? I am a newbie the Haskell. I really have no idea what is going on behind the scenes.
Aucun commentaire:
Enregistrer un commentaire