diff options
| author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-12-21 12:24:41 +0000 |
|---|---|---|
| committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-12-21 12:26:24 +0000 |
| commit | 1a4c04b13a695a530ee24835a7550a8c9ed2d37a (patch) | |
| tree | 6bec42a3a6538d8e26985f4929f49bf257bbf814 /compiler/parser | |
| parent | c48595eef2bca6d91ec0a649839f8066f269e6a4 (diff) | |
| download | haskell-1a4c04b13a695a530ee24835a7550a8c9ed2d37a.tar.gz | |
Fix 'SPECIALISE instance'
Trac #12944 showed that the DsBinds code that implemented a
SPECIALISE pragma was inadequate if the constraints solving
added let-bindings for dictionaries. The result was that
we ended up with an unbound dictionary in a DFunUnfolding -- and
Lint didn't even check for that!
Fixing this was not entirely straightforward
* In DsBinds.dsSpec we use a new function
TcEvidence.collectHsWrapBinders
to pick off the lambda binders from the HsWapper
* dsWrapper now returns a (CoreExpr -> CoreExpr) function
* CoreUnfold.specUnfolding now takes a (CoreExpr -> CoreExpr)
function it can use to specialise the unfolding.
On the whole the code is simpler than before.
Diffstat (limited to 'compiler/parser')
0 files changed, 0 insertions, 0 deletions
