summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/GivenCheckSwap.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/GivenCheckSwap.hs')
-rw-r--r--testsuite/tests/indexed-types/should_compile/GivenCheckSwap.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/GivenCheckSwap.hs b/testsuite/tests/indexed-types/should_compile/GivenCheckSwap.hs
new file mode 100644
index 0000000000..8d053f312a
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/GivenCheckSwap.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE TypeFamilies #-}
+
+module GivenCheckSwapMain where
+
+type family S x
+
+f :: a -> S a
+f = undefined
+
+g :: Char ~ S a => a -> Char
+g y | False = f y
+ | otherwise = 'a'