Closed thumphries closed 7 years ago
Can fix by stashing the evaluated e'
when a pattern match fails, but that might be papering over a more serious subst bug
OK it's a decent bug. thank mr quickcheck
the lexically-scoped maps require a full traversal for substitution to complete. Since we go under binders etc (dumb use of nf
instead of whnf
when we hit an App), we are going to occasionally hit Apps and Cases where the e is not a redex, but we need to keep reducing anyway to finish substituting.
We also have a real inconsistency! If the e
is not a redex, but we have a pattern PVar, we might take and inline the wrong branch. Might need to alter the semantics a little, I'm not sure any eval strategy will work. e.g. if we hit a Con pattern and we're not a Con yet, fail the match immediately.
steps:
Having trouble reducing this. Looks like a mistake in
match
or dodgy incomplete substitution somewhere, stashing for later.