2
votes

Hi I'm a student and completely new to programming and Haskell. I'm using a Mac 10.11.5 downloaded and installed Xcode, Command Line Tools, and the Haskell Platform and managed to find the Terminal and start the GHCi Interpreter simply by typing $ghci.

Problem is in my University documents and in The GHC documentation it says it should look like:

user@local:~$ ghci -W
GHCi, version 7.4.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> 

In my case it's just

Moritzs-Air:~ mm$ ghci
GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
Prelude> 

I've checked ghc-pkg list. The cabal packages are installed. Is everything working correctly or do i have to load the packages somehow?

Is there any possibility for a complete noob to check that ghci is working correctly. i have to run a few simple tasks and my results are graded.

Moritz

1
don't worry - the reply you get is a good indication of a working install - notice the version - 7.4.1 is quite a while back - if you like you can start asking it a few questions like 5+5, :t "Hello", ... - Random Dev
maybe you should get back to your university and ask them to rework their material - it's not exactly wrong to recommend this but IMHO either just stack or haskell for mac is a better choice (easier to install and operate) - Random Dev
@Carsten thx a a lot. So in the newest versions it's normal that the "loading package..." isn't displayed anymore? result to :t "Hello is :"Hello" :: [Char]is this good haha? - Moritz M
yes - see the Prelude> - it basically includes all this stuff - Random Dev
if you did not change you settings and add another module: :m +Data.List - you will see it there too: Prelude Data.List> - really: don't worry - Random Dev

1 Answers

5
votes

Those three packages (ghc-prim, integer-gmp, and base) just don't report loading in new versions of ghci.

base, for example, provides Prelude> and its support libraries, so if you see it, it's loaded.