0
votes

I'm a haskell newcomer, I've tried googling, IRC, and doing what the CLI tells me to do, but can't seem to get basic haskell ecosystem tools to play nice.

I installed ghc, stack, and cabal via the minimal installers OSX link on this page https://www.haskell.org/downloads and now I'm running into some strange resolver problems while trying to get started with stack. I run stack ghci it tells me that it wants 7.10.3 and to run stack setup. Setup then says it installed [email protected]. Any help would be much appreciated, thank you!

1
Try remove everything and install stack only. If you have homebrew run brew install haskell-stack and stack setup will install everything including ghc and cabal for you. - zakyggaps
I didn't install via brew, I installed via the manual download. Apparently the version of stack in that package is 0.1.0.2 which is super old, and this bug is very dated. I don't know why the .org downloads page installs an ancient version of the tool, but my fix ended up being to download stack manually from here: github.com/commercialhaskell/stack/blob/master/doc/… and then once I downloaded the zip I ran mv ~/Downloads/stack-1.0.2-osx-x86_64/stack /Applications/ghc-7.10.2.app/Contents/bin/stack to put the updated stack in place of the old one. Seems to work! - nackjicholson
The old version is actually 0.1.2.0, typo - nackjicholson
The homepage of other languages are usually maintained by compiler team and / or big companies, while the homepage of haskell is maintained by volunteers. So almost everything on www.haskell.org is outdated. They still recommend MinGHC for installation on windows but if you click the link you will see "MinGHC is dead. Please use Stack." in bold and big font. You'd better stick with the community for latest news (by community I mean /r/haskell, haskell-cafe and here). - zakyggaps
@nackjicholson can you add your comment as an answer? (maybe including what zakyggaps said)? - Random Dev

1 Answers

1
votes

Apparently the version of stack in that package is 0.1.2.0 which is super old, and this bug is very dated. I don't know why the .org downloads page installs an ancient version of the tool, but my fix ended up being to download stack manually from here: https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md and then once I downloaded the zip I ran

mv ~/Downloads/stack-1.0.2-osx-x86_64/stack /Applications/ghc-7.10.2.app/Contents/bin/stack

That command puts the updated stack in place of the old one and things then seem to work!

As a note: Learning more about installing haskell, it seems everyone suggests that you never install haskell via haskell.org but instead install stack on it's own and use it to install haskell.