help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to make sure ghc uses installed packages?


From: Jesse Gibbons
Subject: How to make sure ghc uses installed packages?
Date: Mon, 16 Sep 2019 16:35:14 -0600

I'm trying Conrad Barski's haskell tutorial[1] but it looks like
runhaskell cannot find a few packages that will be necessary in the
tutorial.
[1]:http://lisperati.com/haskell/
I installed ghc, ghc-random and ghc-regex-compat. I typed up the
program as instructed. Then I ran "runhaskell tutorial.hs" and got this
output:
2 packages in profile
jesse@piranhaplant ~/Documents/haskell$ runhaskell tutorial.hs 

tutorial.hs:2:1: error:
    Could not find module ‘Text.Regex’
    Perhaps you meant Text.Read (from base-4.12.0.0)
    Use -v to see a list of the files searched for.
  |
2 | import Text.Regex
  | ^^^^^^^^^^^^^^^^^

tutorial.hs:3:1: error:
    Could not find module ‘System.Random’
    Use -v to see a list of the files searched for.
  |
3 | import System.Random
  | ^^^^^^^^^^^^^^^^^^^^

I searched hackage and hoogle to find which packages I would need to
install, and confirmed I have the correct packages installed, but ghc
can't seem to find them. I even changed the version of ghc and logged
into a terminal to see if I needed a different version. No difference.


Can somebody help me out please?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]