Fix #15725 with an extra Sym
authorRyan Scott <ryan.gl.scott@gmail.com>
Mon, 15 Oct 2018 08:25:02 +0000 (10:25 +0200)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Mon, 15 Oct 2018 08:25:03 +0000 (10:25 +0200)
commit48efbc04bd45d806c52376641e1a7ed7278d1ec7
treed4b17a77e41e3073244bee4c6d3cac63c90805b6
parent8e6c34fdf485bcbd16274896f821448db268c5fa
Fix #15725 with an extra Sym

Summary:
We were adding a `Sym` to one argument in the `InstCo`
case of `optCoercion` but not another, leading to the two arguments
to misaligned when combined via `Trans`. This fixes the issue with
a well targeted use of `wrapSym`.

Test Plan: make test TEST=T15725

Reviewers: goldfire, ningning, bgamari

Reviewed By: goldfire, ningning

Subscribers: rwbarton, carter

GHC Trac Issues: #15725

Differential Revision: https://phabricator.haskell.org/D5217
compiler/types/OptCoercion.hs
testsuite/tests/dependent/should_compile/T15725.hs [new file with mode: 0644]
testsuite/tests/dependent/should_compile/all.T