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