summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@richarde.dev>2021-01-04 11:07:00 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-09 21:19:45 -0500
commitc8c63dde01686a96af4dabcced78110368efaec3 (patch)
treeb8801ecd61c343c18cf05fee157886e37554b244 /testsuite/tests/polykinds
parentf88fb8c7d803f9d3bf245fa4bd9c50f7a2bd3c5b (diff)
downloadhaskell-c8c63dde01686a96af4dabcced78110368efaec3.tar.gz
Never Anyify during kind inference
See Note [Error on unconstrained meta-variables] in TcMType. Close #17301 Close #17567 Close #17562 Close #15474
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r--testsuite/tests/polykinds/NestedProxies.hs28
-rw-r--r--testsuite/tests/polykinds/T13393.hs2
-rw-r--r--testsuite/tests/polykinds/all.T1
3 files changed, 30 insertions, 1 deletions
diff --git a/testsuite/tests/polykinds/NestedProxies.hs b/testsuite/tests/polykinds/NestedProxies.hs
new file mode 100644
index 0000000000..d59d026544
--- /dev/null
+++ b/testsuite/tests/polykinds/NestedProxies.hs
@@ -0,0 +1,28 @@
+{-# LANGUAGE KindSignatures #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE StarIsType #-}
+{-# OPTIONS_GHC -Wno-star-is-type #-}
+-- NB: -XNoPolyKinds. All the variables in the Proxies should be defaulted to *.
+
+module NestedProxies where
+
+import Data.Proxy
+
+-- | 'F1' docs
+type family F1 a b :: * -> *
+-- | 'F2' docs
+type family F2 a b :: * -> * where
+ F2 Int b = Maybe
+ F2 a b = []
+-- | 'D' docs
+data family D a :: * -> *
+
+v :: Int
+v = 42
+
+-- | 'C' docs
+class C a where
+ -- | 'AT' docs
+ type AT a
+ type AT a = Proxy (Proxy (Proxy (Proxy (Proxy (Proxy (Proxy (Proxy (Proxy (Proxy)))))))))
diff --git a/testsuite/tests/polykinds/T13393.hs b/testsuite/tests/polykinds/T13393.hs
index f1c4af3fa0..28cf87a6d5 100644
--- a/testsuite/tests/polykinds/T13393.hs
+++ b/testsuite/tests/polykinds/T13393.hs
@@ -28,7 +28,7 @@ newtype AacEncSt (rate :: Rate) channels (codec :: AacCodec) = MkAacEncSt
-- makeLenses ''AacEncSt
-type Iso s t a b = forall p f. (Functor f) => (a -> f b) -> s -> (f t)
+type Iso s t a b = forall f. (Functor f) => (a -> f b) -> s -> (f t)
instance (Monad m, Monoid w) => MonadState s (RWST r w s m) where
iso :: (s -> a) -> (b -> t) -> Iso s t a b
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 52529f882a..c82f275f65 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -228,6 +228,7 @@ test('T18300', normal, compile_fail, [''])
test('T18451', normal, compile_fail, [''])
test('T18451a', normal, compile_fail, [''])
test('T18451b', normal, compile_fail, [''])
+test('NestedProxies', normal, compile, [''])
test('T18522-ppr', normal, ghci_script, ['T18522-ppr.script'])
test('T18855', normal, compile, [''])
test('T19092', normal, compile, [''])