jaspervdj / turnstyle

Turnstyle is a graphical esoteric programming language based on lambda calculus
https://jaspervdj.be/turnstyle/
GNU General Public License v2.0
76 stars 2 forks source link

`whnf(ctx)` seems to never be called on `VarExpr` #9

Open JanEricNitschke opened 6 days ago

JanEricNitschke commented 6 days ago

I was trying to track the logic flow of the example programs and noticed that the little slider never seems to hit a VarExpr. Tried to do some debugging but only noticed that it never seems to actually call .whnf on one, at least in the pi example.

jaspervdj commented 6 days ago

I hadn't thought about this much but it makes sense, since we use simple substitution to evaluate the expressions. I think we'll eventually want to get rid of this and make the environment with variables explicit. This is also necessary for #4.

I'm also not sure if onWhnf is really the right way to track the logic visually, maybe onParse is better.