diff options
Diffstat (limited to 'testsuite/tests/indexed-types/should_fail/T2544.hs')
-rw-r--r-- | testsuite/tests/indexed-types/should_fail/T2544.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T2544.hs b/testsuite/tests/indexed-types/should_fail/T2544.hs new file mode 100644 index 0000000000..22f3995286 --- /dev/null +++ b/testsuite/tests/indexed-types/should_fail/T2544.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE TypeOperators, TypeFamilies #-}
+
+module T2544 where
+
+data (:|:) a b = Inl a | Inr b
+
+class Ix i where
+ type IxMap i :: * -> *
+ empty :: IxMap i [Int]
+
+data BiApp a b c = BiApp (a c) (b c)
+
+instance (Ix l, Ix r) => Ix (l :|: r) where
+ type IxMap (l :|: r) = BiApp (IxMap l) (IxMap r)
+ empty = BiApp empty empty
\ No newline at end of file |