diff options
Diffstat (limited to 'testsuite/tests/dependent/should_fail/T14066d.hs')
-rw-r--r-- | testsuite/tests/dependent/should_fail/T14066d.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/dependent/should_fail/T14066d.hs b/testsuite/tests/dependent/should_fail/T14066d.hs new file mode 100644 index 0000000000..dd5676826d --- /dev/null +++ b/testsuite/tests/dependent/should_fail/T14066d.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE RankNTypes, ScopedTypeVariables, PolyKinds #-} + +module T14066d where + +import Data.Proxy + +g :: (forall c b (a :: c). (Proxy a, Proxy c, b)) -> () +g _ = () + +f :: forall b. b -> (Proxy Maybe, ()) +f x = (fstOf3 y :: Proxy Maybe, g y) + where + y :: (Proxy a, Proxy c, b) -- this should NOT generalize over b + -- meaning the call to g is ill-typed + y = (Proxy, Proxy, x) + +fstOf3 (x, _, _) = x |