Algebraic data types for JavaScript using Sweet.js macros