diff options
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/GADT7.hs')
-rw-r--r-- | testsuite/tests/indexed-types/should_compile/GADT7.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/GADT7.hs b/testsuite/tests/indexed-types/should_compile/GADT7.hs new file mode 100644 index 0000000000..00912605b4 --- /dev/null +++ b/testsuite/tests/indexed-types/should_compile/GADT7.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE TypeFamilies, GADTs #-} + +module GADT7 where + +data Pair p where + Pair :: p~(a,b) => a -> b -> Pair p + -- this works: +-- Pair :: a -> b -> Pair (a,b) + +foo :: a +foo = case Pair () () of + -- this works: +-- case Pair () () :: Pair ((), ()) of + Pair x y -> undefined + |