[commit: ghc] master: Fix #15852 by eta expanding data family instance RHSes, too (014d6c1)

git at git.haskell.org git at git.haskell.org
Thu Nov 22 18:46:55 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/014d6c1f08808c4dab6cba80efdc634527d91086/ghc

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

commit 014d6c1f08808c4dab6cba80efdc634527d91086
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Thu Nov 22 11:52:12 2018 -0500

    Fix #15852 by eta expanding data family instance RHSes, too
    
    When I defined `etaExpandFamInstLHS`, I blatantly forgot
    to eta expand the RHSes of data family instances. (Actually, I
    claimed that they didn't //need// to be eta expanded. I'm not sure
    what I was thinking.)
    
    This fixes the issue by changing `etaExpandFamInstLHS` to
    `etaExpandFamInst` and, well, making it actually eta expand the RHS.
    
    Test Plan: make test TEST=T15852
    
    Reviewers: goldfire, bgamari
    
    Reviewed By: goldfire
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15852
    
    Differential Revision: https://phabricator.haskell.org/D5328


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

014d6c1f08808c4dab6cba80efdc634527d91086
 compiler/basicTypes/OccName.hs                     | 30 ++++++++++++++++++++
 compiler/iface/ToIface.hs-boot                     |  2 ++
 compiler/typecheck/TcSplice.hs                     |  8 +++---
 compiler/types/Coercion.hs                         | 25 +++++++++++------
 compiler/types/FamInstEnv.hs                       |  2 +-
 compiler/types/TyCoRep.hs                          | 22 +++++++++------
 compiler/types/Type.hs                             | 32 ++++++++++------------
 testsuite/tests/deSugar/should_run/T5472.stdout    |  1 -
 .../tests/indexed-types/should_compile/T15852.hs   | 10 +++++++
 .../indexed-types/should_compile/T15852.stderr     | 13 +++++++++
 testsuite/tests/indexed-types/should_compile/all.T |  1 +
 .../should_compile/DataFamilyInstanceLHS.stderr    |  2 +-
 .../NamedWildcardInDataFamilyInstanceLHS.stderr    |  2 +-
 .../should_compile/TypeFamilyInstanceLHS.stderr    | 12 ++++----
 14 files changed, 115 insertions(+), 47 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 014d6c1f08808c4dab6cba80efdc634527d91086


More information about the ghc-commits mailing list