We use Hoopl as a show case on how to use advanced language features such as generalized algebraic data types, type families and monad transformers to design good APIs.
Hoopl is a framework for data flow analysis and transformation of control flow graphs. It is used in the code generator back-end of GHC. The API manages to hide the complexity of Lerner-Groove-Chambers' interleaved analysis and transformation while supporting used-defined AST data types.
While we focus on Haskell language features as opposed to compiler construction, we will learn how to implement a liveness analysis as a running example.