A modular compiler for the Patterpit programming language