Initial and Final Encodings by Matt Peddie

Initial and Final Encodings

By Matt Peddie

Representing data as code and vice versa has a long history in functional programming and language theory. I'll present some techniques for changing how functions and data are represented that have significant engineering impact. The main technique I hope to communicate is the 'finally tagless' approach to EDSL implementation (and the associated engineering tradeoffs).