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 2022: Novice Track (Online Conference on 7th December 2022)
- Haskell eXchange 2022: Online Conference (Online Conference on 8th - 9th December 2022)
- Haskell: Why and How the External STG Interpreter is Useful (SkillsCast recorded in December 2021)
- Keynote — Haskell: What To Do When Success Can't Be Avoided (SkillsCast recorded in November 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.