Type Error Customization in GHC

Alejandro Serrano, Jurriaan Hage · 2017

Embedded domain specific languages (DSLs) are a common pattern in the functional programming world, providing very high-level abstractions to programmer. Unfortunately, this abstraction is broken when type errors occur, leaking details of the DSL implementation. In this paper we present a set of techniques for customizing type error diagnosis in order to avoid this leaking. These techniques have been implemented in the GHC Haskell compiler.

Read the paper · More papers on PaperTik