Conversation

This Tweet was deleted by the Tweet author. Learn more
Maybe I'm getting mixed up between 'environments' and 'contexts' too - I was attempting to use the typechecking context to do my substitutions, but it's obvious now that it that would break down in more complex examples. In HOAS you get an environment for free.
2
AFAIU: context = name -> type, env = name -> value. And the diff between "normalization" and "evaluation" is more-or-less that normalization goes under binders and "fully evaluates" (to "*the* normal form"), mere 'evaluation' doesn't (necessarily).
1
1
(I'm also not -certain- HOAS couldn't work in Rust - do you _need_ to use Rc everywhere, can't you use &Fn during the normalization process? I might experiment a little...)
1
1
(incidentally, if you know how to make the ugly parts of that (e.g. (*foo).clone()) less ugly, i'd be curious) (haven't looked at yours in detail yet because bbiab:)
1
Also the direct approach of matching and using ? looks cleaner in Rust and formats better than using monadic combinators. Sometimes they do help, but I just tend to use them more sparingly these days.
1
Show replies