[Top][All Lists]

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

Re: How to make sure ghc uses installed packages?

From: Jesse Gibbons
Subject: Re: How to make sure ghc uses installed packages?
Date: Mon, 16 Sep 2019 19:28:26 -0600

On Mon, 2019-09-16 at 17:00 -0700, John Soo wrote:
> Hi Jesse,
> > Can somebody help me out please?
> I can try!
> Can get the contents of $GHC_PACKAGE_PATH please? Guix uses this
> environment variable that is recognized by the ghc toolchain to tell
> ghc where packages are installed.
> What happens if you try to load your file in ghci instead of using
> runhaskell?
> Good luck,
> - John
I wrote a script to do that (attached with output), then for each each
of the available versions, removed all ghc, logged into a virtual
terminal, ran the script, then logged out of the virtual terminal. I
did the log in/out because I previously noticed GHC_PACKAGE_PATH did
not change, even when I uninstalled everything, so I suspected it was
linked to a login script.
It appears the required modules were in GHC_PACKAGE_PATH and the
program did not have an error when I used ghc version 8.4.3

I noticed when I installed each successive version of GHC it suggests I
run a script to update the environment variables. I usually ignored it
because I did not have a problem like this before.

Case closed I guess.

Attachment: output.txt
Description: Text document

Attachment: record-ghc-package-path
Description: Text document

Attachment: tutorial.hs
Description: Text Data

reply via email to

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