Bracer: Transforming Real-World Languages with Coproducts and Recursion Schemes - Patrick Thomson
Channel: Maitria Alex Harms
Date: 2016-06-17

Curly-brace languages won the syntax war: the pattern of delimiting scope with curly braces appears in countless programming languages, data interchange formats, and configuration files. However, the small but significant syntactic differences between these languages means that APIs for transforming, filtering, and modifying said languages are, when they exist at all, very specific and inextensible. Bracer is a Haskell-based toolkit for parsing various curly-brace languages that seeks to change this. I’ll outline the challenges associated with building an extensible language workbench, and how borrowing seemingly-abstract concepts (recursion schemes and coproduces) from the functional-programming literature enables us to parse and transform source code safely, concisely, and efficiently.