Run typed splices in the zonker
authorMatthew Pickering <matthewtpickering@gmail.com>
Wed, 9 Jan 2019 14:52:30 +0000 (14:52 +0000)
committerMatthew Pickering <matthewtpickering@gmail.com>
Fri, 11 Jan 2019 08:45:33 +0000 (03:45 -0500)
commitc2455e647501c5a382861196b64df3dd05b620a2
tree60b56e73488fc237acf76d3f40e782830a6ecf56
parent82d1a88dec216d761b17252ede760da5c566007f
Run typed splices in the zonker

Summary:
This fixes #15471

In the typechecker we check that the splice has the right type but we
crucially don't zonk the generated expression. This is because we might
end up unifying type variables from outer scopes later on.

Reviewers: simonpj, goldfire, bgamari

Subscribers: rwbarton, carter

GHC Trac Issues: #15471

Differential Revision: https://phabricator.haskell.org/D5286
13 files changed:
compiler/deSugar/DsMeta.hs
compiler/hieFile/HieAst.hs
compiler/hsSyn/HsExpr.hs
compiler/rename/RnSplice.hs
compiler/typecheck/TcHsSyn.hs
compiler/typecheck/TcPatSyn.hs
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcRnTypes.hs-boot [new file with mode: 0644]
compiler/typecheck/TcSplice.hs
compiler/typecheck/TcSplice.hs-boot
testsuite/tests/th/T15471.hs [new file with mode: 0644]
testsuite/tests/th/T15471A.hs [new file with mode: 0644]
testsuite/tests/th/all.T