Staging with Class: A Specification for Typed Template Haskell • Ningning Xie • YOW! 2022

This presentation was recorded at YOW! 2022. #GOTOcon #YOW Ningning Xie - Research Associate at Department of Computer Science and Technology University of Cambridge @ningningxie3528 RESOURCES ABSTRACT Multi-stage programming using typed code quotation is an established technique for writing optimizing code generators with strong type-safety guarantees. Unfortunately, quotation in #Haskell interacts poorly with type classes, making it difficult to write robust multi-stage programs. In this talk, I will present my recent work which studies this unsound interaction and proposes a resolution, staged type class constraints, which is formalized in a source calculus that elaborates into an explicit core calculus. I will show type soundness of both calculi, establishing that well-typed, well-staged source programs always elaborate to well-typed, well-staged core programs, and prove beta and eta rules for code quotations. The design allows programmers to incorporate type classes into multi-stage programs with confidence. Although motivated by Haskell, it is also suitable as a foundation for other languages that support both overloading and quotation. [...] RECOMMENDED BOOKS Vitaly Bragilevsky • Haskell in Depth • Rebecca Skinner • Effective Haskell • Graham Hutton • Programming in Haskell • John Whitington • Haskell from the Very Beginning • #SoftwareEngineering #Programming #FunctionalProgramming #Tech #SoftwareDevelopment #SoftwareTechnology #-NingningXie #YOWcon Looking for a unique learning experience? Attend the next GOTO conference near you! Get your ticket at Sign up for updates and specials at SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily.
Back to Top