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 eXchange 2021: Novice Track (Online Conference on 15th November 2021)
- Haskell eXchange 2021: Pro Track (Online Conference on 16th - 17th November 2021)
- Hashing Modulo Alpha Equivalence (SkillsCast recorded in May 2021)
- In The Belly Of The Whale: Tales From Haskell In The Enterprise (SkillsCast recorded in May 2021)
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.