Join us for an intermediate-to-advanced Haskell talk from Alejandro Serrano.
One of the main selling points of Haskell is its strong type system. How can you squeeze it even further, and even go beyond their limits? And when should you do that?
This talk provides an introduction about two seemingly disparaging topics, which share a common goal: provide a more expressive type language to be more precise in describing values. On the one hand, we have Generalized Algebraic Data Types (GADTs for short), a very popular GHC extension. On the other hand, we have LiquidHaskell, a plug-in for the GHC compiler which adds support for so-called refinement types.
Both approaches give you tools to prevent the hideous "head applied to an empty list" problem without having to manually check for emptiness. Instead, we make our tools more aware of the shape of the values (the length of the list, in this case), so it can automatically check whether calls to head are correct at compile time.
A Q&A session will immediately follow the talk - please add your questions throughout the talk to the Q&A section, not chat.