Monadic DSLs are ubiquitous in functional programming: Parser combinators, build systems, test data generators (like QuickCheck’s Gen) are usually monadic, and »Free Monad + Interpreter« is a well-known pattern for building DSLs. Monads allow a great deal of flexibility for DSL embedding, and come with a rich interface of generic combinators. In comparison, Applicatives seem quite restricted at first glance. On the other hand however, Applicatives compose and parallelize easily, and provide several additional benefits, as we will see. Are these worth the restrictions?
In this talk, we are going to explore libraries like optparse-applicative that use an applicative DSL for extra benefit, and show the design of an applicative DSL by the example of an Applicative test data generator library.
This session is held on in Talks #1