C.6 Running a Haskell Program
(Assuming a UNIX environment.)
Enter ghci at the command prompt and enter expressions interactively to evaluate them:
Using this method of execution, the programmer can create bindings and define new functions at the prompt of the interpreter:
Enter the EOF character (which is <ctrl-d> on UNIX systems and <ctrl-z> on Windows systems) or :quit (or :q) to quit the interpreter.
Enter ghci <filename>.hs from the command prompt using file I/O, which causes the program in <filename>.hs ...
Get Programming Languages: Concepts and Implementation now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.