I have installed Haskell platform following the instructions on chocolatey and haskell.org. I am using Windows 10. My hello.hs program complies in command prompt, but when I try to do the same in VS code, it won't load Prelude, which I assume is necessary for running Haskell programs. I think it might be a configuration problem, but I cant find any useful documentation on it. How could I fix this and turn on Prelude? Are the problems that VS code shows relevant to this problem?
Cant load Prelude in ghci interpreter in VS code
2.6k Views Asked by DLaningham At
3
There are 3 best solutions below
0

Nothing looks wrong in your screenshots. The prompt text is ghci>
rather than Prelude>
because GHCi no longer defaults to showing the loaded modules on the prompt (see the GHC 9.0.1 changelog. Prelude
is being loaded regardless. The warning shown in the IDE is a style suggestion that is inconsequential for the purpose of getting your code to run. As chi suggests, :l hello.hs
at the GHCi prompt should be enough to have it loaded.
This might work
You may need to just run
import Prelude
.