From 014d6c1f08808c4dab6cba80efdc634527d91086 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Thu, 22 Nov 2018 11:52:12 -0500 Subject: 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 --- testsuite/tests/indexed-types/should_compile/T15852.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 testsuite/tests/indexed-types/should_compile/T15852.hs (limited to 'testsuite/tests/indexed-types/should_compile/T15852.hs') diff --git a/testsuite/tests/indexed-types/should_compile/T15852.hs b/testsuite/tests/indexed-types/should_compile/T15852.hs new file mode 100644 index 0000000000..65c4ae68bc --- /dev/null +++ b/testsuite/tests/indexed-types/should_compile/T15852.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE TypeFamilies #-} +module T15852 where + +import Data.Kind +import Data.Proxy + +data family DF a (b :: k) +data instance DF (Proxy c) :: Proxy j -> Type -- cgit v1.2.1