Capture and simplify constraints arising from running typed splices

Authored by mpickering on Feb 3 2019, 5:46 AM.

Description

Capture and simplify constraints arising from running typed splices

This fixes a regression caused by Trac #15471 where splicing in a trivial
program such as [|| return () ||] would fail as the dictionary for
return would never get bound in the module containing the splice.

Arguably this is symptomatic of a major problem affecting TTH where we
serialise renamed asts and then retype check them. The reference to the
dictionary should be fully determined at the quote site so that splicing
doesn't have to solve any implicits at all. It's a coincidence this
works due to coherence but see Trac #15863 and Trac #15865 for examples where
things do go very wrong.

Fixes Trac #16195

(cherry picked from commit a48753bdbc99cda36890e851950f5b79e1c3b2b2)

Details

Committed
bgamariFeb 20 2019, 1:28 PM
Parents
rGHCa53b2f45bd1c: Fix #14729 by making the normaliser homogeneous
Branches
Unknown
Tags
Unknown