diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2019-08-17 08:27:35 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-08-18 05:18:01 -0400 |
commit | d071627932f61a20223ff0875ed96452f9e81b34 (patch) | |
tree | 991a466f9e132bc9c12ffd224bf3f4cee28b2e3f /testsuite/tests/typecheck/should_compile/T17067.hs | |
parent | 1230d6f92440818241f3ae776fc51742c7395bb4 (diff) | |
download | haskell-d071627932f61a20223ff0875ed96452f9e81b34.tar.gz |
Fix #17067 by making data family type constructors actually injective
`TcTyClsDecls.tcFamDecl1` was using `NotInjective` when creating data
family type constructors, which is just plain wrong. This tweaks it
to use `Injective` instead.
Fixes #17067.
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T17067.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T17067.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T17067.hs b/testsuite/tests/typecheck/should_compile/T17067.hs new file mode 100644 index 0000000000..2666c4cf2b --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T17067.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE TypeFamilies #-} +module T17067 where + +import Data.Kind + +data family D1 a +data family D2 :: Type -> Type + +type family F a +type instance F (D1 a) = a +type instance F (D2 a) = a |