Haskell-Things / ImplicitCAD

A math-inspired CAD program in haskell. CSG, bevels, and shells; 2D & 3D geometry; 2D gcode generation...
https://implicitcad.org/
GNU Affero General Public License v3.0
1.41k stars 142 forks source link

Splitting up StateC and CompState #432

Closed lepsa closed 2 years ago

lepsa commented 2 years ago

Splitting StateC into a Reader/Writer/State transformer, as scadOpts was only ever read from, and messages was only ever written to or returned at the end of a processing batch.

This also involved splitting these values out of CompState as they did not need to both readable and writable.

Setting up some constraint types to allow easier use of the new monad transformer in code that doesn't need to know the exact structure of the transformer, just what it can do.