See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More
( 6 months ago )

How do I get going with Haskell on my computer?

Course Queries Syllabus Queries
Max. 2000 characters

Vanshika Bhatt


( 6 months ago )

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.

Jignesh Patel


( 6 months 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 (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-'.
    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:

  2 module Main where
  4 import Test.HUnit
  5 import System

what's your interest