Preserve ShadowInfo when rewriting evidence

Authored by simonpj on Jun 3 2019, 8:46 AM.

Description

Preserve ShadowInfo when rewriting evidence

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 Trac #16735)
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.

Details

Committed
Marge Bot <ben+marge-bot@smart-cactus.org>Jun 7 2019, 9:24 AM
Parents
rGHC387050d0e26a: Factor out 'getLibDir' / 'getBaseDir' into a new GHC.BaseDir ghc-boot module
Branches
Unknown
Tags
Unknown
Marge Bot <ben+marge-bot@smart-cactus.org> committed rGHCda26ffe795f1: Preserve ShadowInfo when rewriting evidence (authored by simonpj).Jun 7 2019, 9:24 AM