diff options
Diffstat (limited to 'testsuite/tests/gadt/data1.hs')
-rw-r--r-- | testsuite/tests/gadt/data1.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/gadt/data1.hs b/testsuite/tests/gadt/data1.hs new file mode 100644 index 0000000000..9dac84000e --- /dev/null +++ b/testsuite/tests/gadt/data1.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE GADTs #-}
+
+-- Trac #289
+
+module ShouldCompile where
+
+class C a where
+ f :: a -> Bool
+
+data T a where
+ MkT :: (C a) => a -> T a
+
+tf1 :: T Int -> Bool
+tf1 (MkT aa) = f aa
+
+tf2 :: T a -> Bool
+tf2 (MkT aa) = f aa
|