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:
- Fireside chat: Martin Odersky & Simon Peyton Jones (SkillsCast recorded in December 2018)
- Haskell eXchange 2020 (Online Conference on 4th - 5th November 2020)
- What's in a Functional Compiler? (SkillsCast recorded in July 2020)
- The Secrets of the GHC Garbage Collector (SkillsCast recorded in June 2020)
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.