summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/gadt24.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/gadt/gadt24.hs')
-rw-r--r--testsuite/tests/gadt/gadt24.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/gadt/gadt24.hs b/testsuite/tests/gadt/gadt24.hs
new file mode 100644
index 0000000000..86cece09dd
--- /dev/null
+++ b/testsuite/tests/gadt/gadt24.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE GADTs #-}
+
+-- Test for Trac #1396
+-- Panics in GHC 6.6.1
+
+module ShouldCompile where
+
+data Right provides final where
+ RightNull :: Right final final
+ RightCons :: b -> Right a final -> Right (b -> a) final
+
+collapse_right :: right -> Right right final -> final
+--collapse_right f (RightNull) = f
+collapse_right f (RightCons b r) = collapse_right (f b) r