Open derifatives opened 3 years ago
It's also possible I've done something previously that messed up my system. I don't really understand Haskell install or what is / isn't hermetic.
I was just about to open an issue about this. The problem is that the guide uses the old-fashioned way of installing libraries. Cabal has changed a lot in the last few years.
I think the simplest solution (assuming that you're using Cabal 3+, check with cabal -V
) would be to create a folder for the Haskell source files you're going to write, then run cabal install --package-env /PATH_TO_YOUR_FOLDER --lib
instead of just cabal install
. This will create a file called something like .ghc.environment.x86_64-darwin-8.10.3
, which will tell calls to ghc
and ghci
from that folder, where to find MCPrelude
.
@mightybyte Should I open a PR modifying/expanding the instructions, or do you have a preferred solution?
This does seem to work, thanks!
That's a bizarre error @Aster89.
Is there any chance you've tampered with your ghci
? Do you have another ghci
on your PATH
, or have you set an alias? What happens if you run which ghci
?
@georgefst , I had an alias :/
I followed the "Getting Started" instructions at https://mightybyte.github.io/monad-challenges/. The
cabal install
ran for a long time (maybe 20 minutes? I wandered off) but seemed to complete successfully. However, trying toghci
a simple toy file failed to import the prelude:Is there maybe some missing piece of newbie instructions here? Do I have to somehow add
MCPrelude
to a path or something?