A library for programming with algebraic data types