summaryrefslogtreecommitdiff
path: root/testsuite/tests/dependent
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2017-08-15 17:22:50 -0400
committerRichard Eisenberg <rae@cs.brynmawr.edu>2017-09-28 21:02:38 -0400
commit7aa000b625c677534c87da43de31c27a2b969183 (patch)
treea8f0f64ff2160ec187e1052433b7c5a75768d718 /testsuite/tests/dependent
parent5935acdb1302263011c2023d5e7f4ec496c972c0 (diff)
downloadhaskell-7aa000b625c677534c87da43de31c27a2b969183.tar.gz
Fix #13391 by checking for kind-GADTs
The check is a bit gnarly, but I couldn't think of a better way. See the new code in TcTyClsDecls. test case: polykinds/T13391
Diffstat (limited to 'testsuite/tests/dependent')
-rw-r--r--testsuite/tests/dependent/should_compile/Dep2.hs2
-rw-r--r--testsuite/tests/dependent/should_compile/KindEqualities.hs6
-rw-r--r--testsuite/tests/dependent/should_compile/KindEqualities.stderr2
3 files changed, 6 insertions, 4 deletions
diff --git a/testsuite/tests/dependent/should_compile/Dep2.hs b/testsuite/tests/dependent/should_compile/Dep2.hs
index 34be3cffc6..df1cb51e08 100644
--- a/testsuite/tests/dependent/should_compile/Dep2.hs
+++ b/testsuite/tests/dependent/should_compile/Dep2.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE PolyKinds, GADTs #-}
+{-# LANGUAGE TypeInType, GADTs #-}
module Dep2 where
diff --git a/testsuite/tests/dependent/should_compile/KindEqualities.hs b/testsuite/tests/dependent/should_compile/KindEqualities.hs
index 1f2e82c302..4cba8281ca 100644
--- a/testsuite/tests/dependent/should_compile/KindEqualities.hs
+++ b/testsuite/tests/dependent/should_compile/KindEqualities.hs
@@ -1,8 +1,10 @@
-{-# LANGUAGE PolyKinds, GADTs, ExplicitForAll #-}
+{-# LANGUAGE TypeInType, GADTs, ExplicitForAll #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module KindEqualities where
+import Data.Kind
+
data TyRep1 :: * -> * where
TyInt1 :: TyRep1 Int
TyBool1 :: TyRep1 Bool
@@ -13,7 +15,7 @@ zero1 TyBool1 = False
data Proxy (a :: k) = P
-data TyRep :: k -> * where
+data TyRep :: forall k. k -> * where
TyInt :: TyRep Int
TyBool :: TyRep Bool
TyMaybe :: TyRep Maybe
diff --git a/testsuite/tests/dependent/should_compile/KindEqualities.stderr b/testsuite/tests/dependent/should_compile/KindEqualities.stderr
index af429d106b..ad9562eae8 100644
--- a/testsuite/tests/dependent/should_compile/KindEqualities.stderr
+++ b/testsuite/tests/dependent/should_compile/KindEqualities.stderr
@@ -1,5 +1,5 @@
-KindEqualities.hs:23:1: warning: [-Wincomplete-patterns (in -Wextra)]
+KindEqualities.hs:25:1: warning: [-Wincomplete-patterns (in -Wextra)]
Pattern match(es) are non-exhaustive
In an equation for ‘zero’:
Patterns not matched: (TyApp (TyApp _ _) _)