Please log in to watch this conference skillscast.
How hard can it be to spot missing or overlapping patterns in a Haskell function definition? Surely it’s the least we can expect from a decent compiler? But when you mix in GADTs, pattern guards, view patterns, data families, strict data constructors, and pattern synonyms, matters get surprisingly tricky.
In a 2015 paper “GADTs meet their match” they explored a nice, modular account of pattern-match checking that addresses many of these tricky points. Alas, GHC’s implementation of that paper has proved less than satisfactory: it can be terribly slow, and misses cases that programmers think look obvious. So Simon and colleague Sebastian Graf have been radically refactoring the implementation.
In this talk Simon will give lots of tricky examples of pattern matching, describe how to think about coverage and overlap checking, and reflect on how thier new refactored implementation works.
YOU MAY ALSO LIKE:
Keynote: Revisiting Pattern Match Overlap Checks
Simon Peyton Jones, MA, MBCS, CEng, graduated from Trinity College Cambridge in 1980. Simon was a key contributor to the design of the now-standard functional language Haskell, and is the lead designer of the widely-used Glasgow Haskell Compiler (GHC). He has written two textbooks about the implementation of functional languages.
After two years in industry, he spent seven years as a lecturer at University College London, and nine years as a professor at Glasgow University before moving to Microsoft Research (Cambridge) in 1998.
His main research interest is in functional programming languages, their implementation, and their application. He has led a succession of research projects focused around the design and implementation of production-quality functional-language systems for both uniprocessors and parallel machines.
More generally, he is interested in language design, rich type systems, software component architectures, compiler technology, code generation, runtime systems, virtual machines, and garbage collection. He is particularly motivated by direct use of principled theory to practical language design and implementation -- that's one reason he loves functional programming so much.