I am learning my first functional programming language, but I have some problems with the initial logistics (the professor basically said: “Somehow it was set up” and did not provide details.)
Anyway, I have Mac OS X version 10.6.8. To get started, I installed GHC in my home directory and found that I can open it using the "ghci" command in the terminal. From there (excuse my complete lack of knowledge), I followed the vague instructions in the curriculum and opened another window with the a1.hs file, which I must change for the job. When I finished defining the function, I typed the command “ghc a1-skeleton.hs” to open the interpreter loaded in it (what will I do, right?), But I got this error:
a1.hs:5:8:
Could not find module `System'
It is a member of the hidden package `haskell98-2.0.0.1'.
Use -v to see a list of the files searched for.
I assume this is similar to the absence of "#include" or something similar in C ++. Do I just need to find / add something to a specific directory?
In addition, since I did not immediately understand what exactly the interpreter does? Is this a program that skips the "compilation" into the procedural language and just tries to immediately follow the instructions in the .hs file?
Thank!
UPDATE :: Code that seems to be the problem:
2 module Main where
3
4 import Test.HUnit
5 import System
source
share