summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/polykinds/T7176.hs15
-rw-r--r--testsuite/tests/polykinds/all.T1
2 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T7176.hs b/testsuite/tests/polykinds/T7176.hs
new file mode 100644
index 0000000000..e3416d1420
--- /dev/null
+++ b/testsuite/tests/polykinds/T7176.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE TypeFamilies, DataKinds, PolyKinds, GADTs, RankNTypes #-}
+
+module T7176 where
+
+type family Sing (a :: b)
+
+data SMaybe (a :: Maybe c) where
+ SNothing :: SMaybe Nothing
+ SJust :: Sing a -> SMaybe (Just a)
+type instance Sing (a :: Maybe d) = SMaybe a
+
+sIsJust :: forall (a :: Maybe e). Sing a -> ()
+sIsJust SNothing = ()
+sIsJust (SJust _) = ()
+
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index fc7b08ae79..e3b14f6467 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -62,4 +62,5 @@ test('T7073', normal, compile,[''])
test('T7128', normal, compile,[''])
test('T7151', normal, compile_fail,[''])
test('T7095', normal, compile,[''])
+test('T7176', normal, compile,[''])