A C++ library for writing modular compilers