summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/T14320.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/gadt/T14320.hs')
-rw-r--r--testsuite/tests/gadt/T14320.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/gadt/T14320.hs b/testsuite/tests/gadt/T14320.hs
new file mode 100644
index 0000000000..4acd4c8f63
--- /dev/null
+++ b/testsuite/tests/gadt/T14320.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE RankNTypes, GADTs, KindSignatures #-}
+module T14320
+where
+
+data Exp :: * where
+ Lit :: (Int -> Exp)
+
+newtype TypedExp :: * -> * where
+ TEGood :: forall a . (Exp -> (TypedExp a))
+
+-- The only difference here is that the type is wrapped in parentheses,
+-- but GHC 8.0.1 rejects this program
+--
+newtype TypedExpToo :: * -> * where
+ TEBad :: (forall a . (Exp -> (TypedExpToo a)))