summaryrefslogtreecommitdiff
path: root/testsuite/tests/dependent/should_compile/T14066h.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/dependent/should_compile/T14066h.hs')
-rw-r--r--testsuite/tests/dependent/should_compile/T14066h.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/dependent/should_compile/T14066h.hs b/testsuite/tests/dependent/should_compile/T14066h.hs
new file mode 100644
index 0000000000..df3db1c15d
--- /dev/null
+++ b/testsuite/tests/dependent/should_compile/T14066h.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE ScopedTypeVariables, PolyKinds, MonoLocalBinds #-}
+
+module T14066h where
+
+import Data.Proxy
+
+f :: forall b. b -> (Proxy Int, Proxy Maybe)
+f x = (fst y :: Proxy Int, fst y :: Proxy Maybe)
+ where
+ y :: (Proxy a, b) -- this generalizes over the kind of a
+ y = (Proxy, x)