Evaluating Haskell expressions in a tutoring environment

Tim Olmer
(Open University of the Netherlands)
Bastiaan Heeren
(Open University of the Netherlands)
Johan Jeuring
(Universiteit Utrecht and Open University of the Netherlands)

A number of introductory textbooks for Haskell use calculations right from the start to give the reader insight into the evaluation of expressions and the behavior of functional programs. Many programming concepts that are important in the functional programming paradigm, such as recursion, higher-order functions, pattern-matching, and lazy evaluation, can be partially explained by showing a stepwise computation. A student gets a better understanding of these concepts if she performs these evaluation steps herself. Tool support for experimenting with the evaluation of Haskell expressions is currently lacking. In this paper we present a prototype implementation of a stepwise evaluator for Haskell expressions that supports multiple evaluation strategies, specifically targeted at education. Besides performing evaluation steps the tool also diagnoses steps that are submitted by a student, and provides feedback. Instructors can add or change function definitions without knowledge of the tool's internal implementation. We discuss some preliminary results of a small survey about the tool.

In James Caldwell, Philip Hölzenspies and Peter Achten: Proceedings 3rd International Workshop on Trends in Functional Programming in Education (TFPIE 2014), Soesterberg, The Netherlands, 25th May 2014, Electronic Proceedings in Theoretical Computer Science 170, pp. 50–66.
Published: 12th December 2014.

ArXived at: https://dx.doi.org/10.4204/EPTCS.170.4 bibtex PDF
References in reconstructed bibtex, XML and HTML format (approximated).
Comments and questions to: eptcs@eptcs.org
For website issues: webmaster@eptcs.org