[commit: ghc] ghc-8.6: Be mindful of GADT tyvar order when desugaring record updates (0af55c1)

git at git.haskell.org git at git.haskell.org
Fri Oct 5 22:49:29 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.6
Link       : http://ghc.haskell.org/trac/ghc/changeset/0af55c128d06e8c23a6fd68bafe47a5315bea812/ghc

>---------------------------------------------------------------

commit 0af55c128d06e8c23a6fd68bafe47a5315bea812
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Fri Aug 17 16:31:27 2018 +0200

    Be mindful of GADT tyvar order when desugaring record updates
    
    After commit ef26182e2014b0a2a029ae466a4b121bf235e4e4,
    the type variable binders in GADT constructor type signatures
    are now quantified in toposorted order, instead of always having
    all the universals before all the existentials. Unfortunately, that
    commit forgot to update some code (which was assuming the latter
    scenario) in `DsExpr` which desugars record updates. This wound
    up being the cause of #15499.
    
    This patch makes up for lost time by desugaring record updates in
    a way such that the desugared expression applies type arguments to
    the right-hand side constructor in the correct order—that is, the
    order in which they were quantified by the user.
    
    Test Plan: make test TEST=T15499
    
    Reviewers: simonpj, bgamari
    
    Reviewed By: simonpj
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15499
    
    Differential Revision: https://phabricator.haskell.org/D5060
    
    (cherry picked from commit 63b6a1d44849c479d2a7cb59211f5c64d133bc62)


>---------------------------------------------------------------

0af55c128d06e8c23a6fd68bafe47a5315bea812
 testsuite/tests/typecheck/should_compile/all.T | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 173a7e5..878f6a9 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -647,3 +647,4 @@ test('T15431', normal, compile, [''])
 test('T15431a', normal, compile, [''])
 test('T15412', normal, compile, [''])
 test('T15473', normal, compile_fail, [''])
+test('T15499', normal, compile, [''])



More information about the ghc-commits mailing list