Debug and understand Haskell Expressions with the Haskell Substitution Stepper!

About this Project

The Haskell Substitution Stepper was created as a bachelor thesis at the Eastern Switzerland University of Applied Sciences (OST).

Have you ever seen a Haskell expression and asked yourself „what is this expression doing“? The Substitution Stepper is here to help you – whether you are a student trying to understand a function or an experienced programmer trying to fix a bug in your code.

You can define custom input expressions. The stepper then reduces those expressions step by step until head normal form. This way, you get to understand how the result of an expression is calculated. You can also work with custom types and type classes.

Here is an example. For the input expression length [1, 2, 3], the stepper shows the following reduction steps:

length [1, 2, 3]
= 1 + (length [2, 3])
= 1 + (1 + (length [3]))
= 1 + (1 + (1 + (length [])))
= 1 + (1 + (1 + 0))
= 1 + (1 + 1)
= 1 + 2
= 3

Demo

Do you want to work with your own expressions? Click here for the installation guide

Product Documentation

Links

Initial problem statement
Project Plan, Analysis, Proof of Concept, Implementation, Testing, Result
Source Code
Code Documentation generated by Haddock

Authors

Team Members
  • Jan Huber
  • Robin Elvedi
  • Dominik Dietler
Examiners
  • Advisor: Prof. Dr. Farhad D. Mehta
  • External Co-Examiner: Jasper Van der Jeugt
  • Internal Co-Examiner: Prof. Dr. Daniel Patrick Politze