ghci also does compilation, but unlike the non-interactive ghc it doesn't create efficient machine code, but instead compiles to a simpler internal bytecode which is then directly interpreted. Basically ghci is optimized for doing quick compilation (as you would want for quick development) rather than making the result run fast.
In addition it contains other useful stuff for interactive use such as a read-eval-print loop and a debugger.
I'm learning my first functional programming language but having some trouble with the initial logistics (the professor basically said, "get it set up somehow" and didn't provide much detail.)
Anyway, I have Mac OS X version 10.6.8. To start out, I installed GHC in my home directory and found that I could open it with the command "ghci" in terminal. From there (excuse my utter lack of knowledge), I followed the vague instructions in the syllabus and opened another window with the a1.hs file I am to modify for an assignment. When I was done defining a function, I typed the command "ghc a1-skeleton.hs" to open the interpreter with that loaded into it (that's what I would be doing, right?) but got this error:
Could not find module`System'
It is a member of the hidden package `haskell98-220.127.116.11'.
Use -v to see a list of the files searched for.
I'm guessing this is like missing an "#include" or something similar in a language like C++. Do I just need to find/add something to a particular directory?
Also, since I didn't catch on right away with this stuff, what exactly does the interpreter do? Is it a program that skips 'compiling' in the procedural language sense and just tries to follow the commands in a .hs file straight away?
UPDATE:: The code that seems to be the issue:
2module Main where34import Test.HUnit