summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/simpl013.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/simpl013.hs')
-rw-r--r--testsuite/tests/simplCore/should_compile/simpl013.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/simpl013.hs b/testsuite/tests/simplCore/should_compile/simpl013.hs
new file mode 100644
index 0000000000..c91cf50d9c
--- /dev/null
+++ b/testsuite/tests/simplCore/should_compile/simpl013.hs
@@ -0,0 +1,19 @@
+{-# LANGUAGE GADTs #-}
+
+-- This one made GHC 6.4.1 panic because of over-zealous
+-- complaining in mkCase1 when there was an empty list of
+-- alternatives
+
+module Foo2 where
+
+data FooBar = Foo | Bar
+
+data P a = P0 | P1 FooBar
+
+data PS p where
+ C :: P Int -> p b -> PS p
+
+f :: PS P -> Char
+f (C (P1 _) P0) = 'a'
+f (C (P1 Bar) (P1 Bar)) = 'b'
+f (C (P1 _) (P1 Bar)) = 'c'