Regarding your minor question:
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.
manpreet
Best Answer
2 years ago
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 (exccom/tag/use">use 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:
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?
Thanks!
UPDATE:: The code that seems to be the com/tag/issue">issue: