Please log in to watch this conference skillscast.
This talk explains how to fix all the pain, and make records a strength of Haskell, without making them harder to use. We show how to encode records and fields in a type class, then use existing Haskell machinery to abstract over multiple field names. This type class has been added to GHC, and is automatically generated for standard Haskell records. Building on that, we provide a convenient syntax through a Haskell preprocessor.
We’ve validated our design with the DAML programming language (based on the GHC compiler) which uses these records as standard. We’re happy to report that users experiences have been very positive.
Record syntax: https://github.com/ndmitchell/record-dot-preprocessor DAML programming language: https://daml.com/
YOU MAY ALSO LIKE:
- Fast XML Parsing with Haskell (SkillsCast recorded in October 2017)
- Haskell Fundamentals (2-Day Course) with Alejandro Serrano (Online Course on 8th - 9th March 2021)
- Haskell Fundamentals (4-Day Course) with Alejandro Serrano (Online Course on 19th - 22nd April 2021)
- Haskell eXchange 2021 (Online Conference on 16th - 17th November 2021)
- Theorems for Free (SkillsCast recorded in November 2020)
- Comparing Strict and Lazy (SkillsCast recorded in November 2020)
Fixing Haskell Records
Neil Mitchell is a Haskell programmer who lives in Cambridge with his wife Emily and his son Henry. Neil has a PhD in Computer Science from York University, working on making functional programs shorter, faster and safer. Since then he's worked with F# at Credit Suisse and Haskell/F#/C++ at Standard Chartered and Barclays, taking the lessons of functional programming and applying them in finance.