diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-11-22 11:52:12 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-11-22 13:14:02 -0500 |
commit | 014d6c1f08808c4dab6cba80efdc634527d91086 (patch) | |
tree | 7ca1bdf81bb317cbecc49470bebcfd4c7c59ccd8 /testsuite/tests/partial-sigs | |
parent | 66f0056ae1279c3149053aa600c7fe09575212b1 (diff) | |
download | haskell-014d6c1f08808c4dab6cba80efdc634527d91086.tar.gz |
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
Diffstat (limited to 'testsuite/tests/partial-sigs')
3 files changed, 8 insertions, 8 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr index 58f423c163..12982a740c 100644 --- a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr +++ b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr @@ -6,7 +6,7 @@ TYPE CONSTRUCTORS Sing :: forall k. k -> * COERCION AXIOMS axiom DataFamilyInstanceLHS.D:R:SingMyKind_0 :: - Sing _ = DataFamilyInstanceLHS.R:SingMyKind_ + Sing _1 = DataFamilyInstanceLHS.R:SingMyKind_ _1 -- Defined at DataFamilyInstanceLHS.hs:8:15 DATA CONSTRUCTORS A :: MyKind diff --git a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr index a075b34ea4..1cd0417e54 100644 --- a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr +++ b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr @@ -4,7 +4,7 @@ TYPE CONSTRUCTORS Sing :: forall k. k -> * COERCION AXIOMS axiom NamedWildcardInDataFamilyInstanceLHS.D:R:SingMyKind_a0 :: - Sing _a = NamedWildcardInDataFamilyInstanceLHS.R:SingMyKind_a + Sing _a = NamedWildcardInDataFamilyInstanceLHS.R:SingMyKind_a _a -- Defined at NamedWildcardInDataFamilyInstanceLHS.hs:8:15 DATA CONSTRUCTORS A :: MyKind diff --git a/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr index 76c5b3fbc3..ae82437e1d 100644 --- a/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr +++ b/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr @@ -4,13 +4,13 @@ TYPE CONSTRUCTORS type role F nominal nominal F :: * -> * -> * COERCION AXIOMS - axiom TypeFamilyInstanceLHS.D:R:FBool_ :: - F Bool _ = Bool -- Defined at TypeFamilyInstanceLHS.hs:8:15 - axiom TypeFamilyInstanceLHS.D:R:FInt_ :: - F Int _ = Int -- Defined at TypeFamilyInstanceLHS.hs:7:15 + axiom TypeFamilyInstanceLHS.D:R:FBool_1 :: + F Bool _1 = Bool -- Defined at TypeFamilyInstanceLHS.hs:8:15 + axiom TypeFamilyInstanceLHS.D:R:FInt_1 :: + F Int _1 = Int -- Defined at TypeFamilyInstanceLHS.hs:7:15 FAMILY INSTANCES - type instance F Int _ - type instance F Bool _ + type instance F Int _1 + type instance F Bool _1 Dependent modules: [] Dependent packages: [base-4.12.0.0, ghc-prim-0.5.3, integer-gmp-1.0.2.0] |