Using GHC core to Normalise Student Programs
摘要
Ask-Elle is an online tutor for solving small programming exercises in Haskell. It provides feedback by first determining whether a student’s submission matches one of the teacher-provided model solutions. However, Haskell’s rich syntax allows for semantically equivalent but syntactically different programs, making direct comparison challenging. To address this, Ask-Elle applies normalizing program transformations to reduce such syntactic differences. Despite this, some correct programs remain unrecognised. We have developed a new approach to feedback generation that leverages GHC’s internal transformations and warning messages. This method improves the recognition of correct programs while also being much faster. Additionally, we share our experiences using GHC as a library.