Skip to content

Preserve ShadowInfo when rewriting evidence

Simon Peyton Jones requested to merge wip/T16735 into master

When the canonicaliser rewrites evidence of a Wanted, it should preserve the ShadowInfo (ctev_nosh) field. That is, a WDerive should rewrite to WDerive, and WOnly to WOnly.

Previously we were unconditionally making a WDeriv, thereby rewriting WOnly to WDeriv. This bit Nick Frisby (issue #16735 (closed)) in the context of his plugin, but we don't have a compact test case.

The fix is simple, but does involve a bit more plumbing, to pass the old ShadowInfo around, to use when building the new Wanted.

Edited by Simon Peyton Jones

Merge request reports