summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/gadt')
-rw-r--r--testsuite/tests/gadt/T14320.hs15
-rw-r--r--testsuite/tests/gadt/all.T1
2 files changed, 16 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)))
diff --git a/testsuite/tests/gadt/all.T b/testsuite/tests/gadt/all.T
index 3c825f0848..c81ab80c04 100644
--- a/testsuite/tests/gadt/all.T
+++ b/testsuite/tests/gadt/all.T
@@ -114,3 +114,4 @@ test('T9096', normal, compile, [''])
test('T9380', normal, compile_and_run, [''])
test('T12087', normal, compile_fail, [''])
test('T12468', normal, compile_fail, [''])
+test('T14320', normal, compile, [''])