con-kitty / categorifier

Interpret Haskell programs into any cartesian closed category.
BSD 3-Clause "New" or "Revised" License
57 stars 2 forks source link

Add lambda binder to SimplEnv when calling simplExpr #37

Closed zliu41 closed 2 years ago

zliu41 commented 2 years ago

When simplifying a Plugins.Lam, make sure the lambda binder variable is added to SimplEnv.

This fixes the refineFromInScope panic in the tests, but it probably isn't correct for larger examples where there are nested Plugins.Lams, since all the lambda binders would need to be added to SimplEnv.