summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/T15852.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2018-11-22 11:52:12 -0500
committerBen Gamari <ben@smart-cactus.org>2018-11-22 13:14:02 -0500
commit014d6c1f08808c4dab6cba80efdc634527d91086 (patch)
tree7ca1bdf81bb317cbecc49470bebcfd4c7c59ccd8 /testsuite/tests/indexed-types/should_compile/T15852.hs
parent66f0056ae1279c3149053aa600c7fe09575212b1 (diff)
downloadhaskell-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/indexed-types/should_compile/T15852.hs')
-rw-r--r--testsuite/tests/indexed-types/should_compile/T15852.hs10
1 files changed, 10 insertions, 0 deletions
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