redtt icon indicating copy to clipboard operation
redtt copied to clipboard

Idea: let Quote control unfolding

Open jonsterling opened this issue 7 years ago • 4 comments

Maybe we shouldn't automatically unfold anything in evaluation, and instead rely on Quote to specifically request it during checking definitional equivalence. I think I see a way to make that work.

jonsterling avatar Aug 29 '18 11:08 jonsterling

(Just as a remark, this is not as simple as it sounds -- we still need to be able to evaluate to a whnf, in order to implement the typechecker!! Conversion is not the only thing that matters.)

jonsterling avatar Aug 29 '18 22:08 jonsterling

If you allow the type checker to backtrack, that is, to raise NowICareAboutNormalForms, would that still be an issue? On the other hand, we can always try syntactical comparison before doing the full expansion.

favonia avatar Oct 30 '18 21:10 favonia

What would be cool is if I could first evaluate without unfolding, and then tell the evaluator "OK, I want you to unfold this" etc., and just keep trying until things work. I think it might be plausible.

jonsterling avatar Oct 31 '18 02:10 jonsterling

(Then, the idea is that both the typechecker and the conversion checker/quotation would exploit this.)

jonsterling avatar Oct 31 '18 02:10 jonsterling