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.33k stars 141 forks source link

Fixing an off by one error in Expr variable evaluation. #435

Closed lepsa closed 1 year ago

lepsa commented 1 year ago

Fix for https://github.com/Haskell-Things/ImplicitCAD/issues/431

Reversing the order of pattern names and values when evaluating Exprs, and changing how variable lookup is performed to ensure that if a variable is used it always has a value associated with it.

Adding tests to check that let bindings work as expected when nested and overloading names in scope.