Please log in to watch this conference skillscast.
Some high-quality Haskell libraries, including old friends like `text` and new kinds on the block like `generic-lens`, promise that the abstractions provided by these libraries are actually free and will be completely dissolved by the compiler. In the case of `text` the promise is that certain pipelines of text-processing functions will be optimizes (“fused”) to never allocate a full text value; `generic-lens` promises that its generically derived lenses are, after optimization, identical to handwritten ones.
But, in practice, these promises often don’t hold. They held at some point in the past, when the author checked them manually, but later versions regressed.
This problem can be fixed with
inspection-testing, a Haskell library and plugin to the compiler that allows you to explicitly state what you expect from the compilers optimizations, and have the compiler check that it actually happens. This can be used by library authors to test their promises, but also by users to learn more about what the compiler does with their code.
In this talk, you will discover the tale of broken promises in commonly used Haskell libraries, and you will learn how these promises can be checked automatically using inspection-testing.
YOU MAY ALSO LIKE:
- Janet Gregory's Agile Testing for the Whole Team (in London on 28th - 30th October 2019)
- Modern development with Java (in London on 9th - 11th December 2019)
- droidcon London 2019 (in London on 24th - 25th October 2019)
- P3X - People, Product & Process eXchange 2019 (in London on 31st October - 1st November 2019)
- Testing and UB (in London on 21st November 2019)
- Lightning Talk: Making and Testing Code Generators in Haskell (SkillsCast recorded in October 2019)
- GHC Runtime Linker by Example (SkillsCast recorded in October 2019)
A Promise Checked is a Promise Kept: Inspection Testing
Ever since Joachim Breitner got infected with the Haskell fever in 2005, he has been an active part of the community, with many contributions to GHC. Lately, he is driving the GHC proposal process. He obtained a PhD in Karlsruhe, Germany, for the inception and formal verification of the Call Arity program transformation, and has worked as a post-doc with Stephanie Weirich at the University of Pennsylvania to make formal verification of Haskell practical.