summaryrefslogtreecommitdiff
path: root/testsuite/tests/roles/should_compile/T20999.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/roles/should_compile/T20999.hs')
-rw-r--r--testsuite/tests/roles/should_compile/T20999.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/roles/should_compile/T20999.hs b/testsuite/tests/roles/should_compile/T20999.hs
new file mode 100644
index 0000000000..a698bb1ae2
--- /dev/null
+++ b/testsuite/tests/roles/should_compile/T20999.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE RoleAnnotations #-}
+module T20999 where
+
+type T a = Int
+
+type role M nominal phantom
+data M f a = MkM (f (T a))
+
+type role N nominal phantom
+data N f a = MkN (f Int)