简体   繁体   中英

Haskell "stack" won't load ghc-mod

I think I might have created confusion. Here are bash command line entries I used to install Stack to start with:

curl -sSL https://get.haskellstack.org/ | sh  
echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.bashrc  
stack setup

So far this works, and I can test the compiler and the interactive environment and they work fine (ghc and ghci).

Then, when I try to install ghc-mod, it fails:

stack install ghc-mod

This command fails saying that ghc-boot-8.4.4 is not in my indices. I get the same error if I remove everything, start over, and install the bundled version (Haskell.org).

Again, any help much appreciated.

=== Previous post === All: A few more details. I have tried the suggestions, and I've also tried removing the ~/.stack/indices directory and then running "stack update" to refresh it.

The same error still happens when trying to do "stack install ghc-mod" or "stack build ghc-mod", ie "The following package identifiers were not found in your indices: ghc-boot-8.4.4."

Any help much appreciated.

Best regards, David

=== Original Question === Problem: stack install ghc-mod fails, missing ghc-boot-8.4.4

My question is: how do I get my environment to load the required modules (ghc-boot) into the index?

Hello All: My apologies in advance for being an absolute newbie to Haskell. Better late than never. Here's the background.

My goal is to get “Atom with Haskell” working on My MacOS version 10.13.6.

There are a couple of thoughtful pages that attempt to lead one through getting things to work: http://www.jkrause.io/blog/2016/03/26/setup-atom-io-for-developing-haskell-on-osx/ https://github.com/simonmichael/haskell-atom-setup

I have attempted to follow these instructions loading the GHC environment, and I've also tried loading the complete platform: https://www.haskell.org/platform/mac.html

GHC and GHCi appear to work just fine in all three cases.

The problem comes with the following step, and happens the same way following either of the two sets of instructions:

$ stack install ghc-mod

Didn't see ghc-boot-8.4.4 in your package indices
Updating and trying again.
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/          
Downloading timestamp                                                  
No updates to your package index were found                           
Update complete                                                        
The following package identifiers were not found in your indices: ghc-boot-8.4.4
Possible candidates: ghc-boot-8.4.3, ghc-boot-8.4.1, ghc-boot-8.4.2.

I've tried many things, but have been unable to move past this error, ie that ghc-boot-8.4.4 is not found in my index. I'm using lts-12.17. Examining the page for its-12.17, it appears that ghc-boot-8.4.4 should be in the index, see https://www.stackage.org/lts-12.17 .

Thanks, David

ghc-boot-8.4.4 is not present on hackage, for some reason. (As of Nov 11, 2018)

http://hackage.haskell.org/package/ghc-boot

I'm not sure why stack would need to find it in the hackage index, though. It comes already installed with ghc.

ghc-boot for 8.4.4 exists - https://www.stackage.org/lts-12.17/package/ghc-boot-8.4.4

If you run stack update and then try again, that may solve it.

If not, then I would switch back to resolver lts-12-14 and use GHC 8.4.3 instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM