summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/gadt9.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/gadt/gadt9.hs')
-rw-r--r--testsuite/tests/gadt/gadt9.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/gadt/gadt9.hs b/testsuite/tests/gadt/gadt9.hs
new file mode 100644
index 0000000000..df9e0bceb2
--- /dev/null
+++ b/testsuite/tests/gadt/gadt9.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE GADTs #-}
+
+-- This one requires careful handling in
+-- TcUnify.unifyTyConApp, to preserve rigidity.
+
+module ShouldCompile where
+
+data X a b where
+ X :: X a a
+
+data Y x a b where
+ Y :: x a b -> x b c -> Y x a c
+
+doy :: Y X a b -> Y X a b
+doy (Y X X) = Y X X