Evaluating Expressions | |
There's not much point in creating Haskell files if you're going to
do nothing with them. Luckily HEAT allows you to run and test Haskell
program all from within the one window. Sending Expressions to the Interpreter The lower half of the screen comprises the output received from the interpreter and a area to type expressions for evaluation. Try this out without defining any functions by typing some simple maths and noting the response. Rather than use the program as a glorified calculator HEAT allows you to create custom functions for evaluation. If you're unsure what this means have a look at the creating Haskell files section. At the very bottom of the window is an input area for expressions and two buttons; one to evaluate the expression and one to load a program. These perform as follows; Evaluate This button sends whatever text you have entered to the interpreter for evaluation. ![]() If the file is unsaved it will prompt to save. You will not be able to evaluate any new expressions you have added unless you use the "load" button explained below. Load This allows you to check the status of the Haskell program without saving the work first. It is useful if you have added a new function and need to test that the interpreter now loads OK. ![]() Remember that the load does not save the actual file you are working on so if you close Heat without saving your work wil be lost. Status Also contained here is the status icon. This lets you know the outcome of loading the file with the interpreter; ![]() ![]() ![]() These represent status not yet known, program compiled ok and program did not compile ok. | |