DSLs in Haskell: decoupling "what" from the "how"
Details
In this talk, Koen De Keyser will go over the basics of constructing a domain-specific-language (DSL) in Haskell: how one can define such a DSL, either from scratch or using the “Free” constructs, and how this represents a powerful abstraction primitive by allowing the user of the DSL to focus only on expressing “what” he wants to do, while a plugable DSL runner defines “how” this is accomplished.
A simple key/value database access DSL will be used throughout the talk. To show how the functor-applicative-monad typeclasses provide the ideal composition operations for this DSL, different runners, each with distinct performance/consistency properties, will be compared. The real-world relevance of this topic will be touched upon by looking at the similarities of our DSL with Haxl, the DSL for back-end access built by the Haskell team at Facebook."
