A port of csg.js to Haskell