summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/indexed-types/should_compile/InstEqContext2.hs')
-rw-r--r--testsuite/tests/indexed-types/should_compile/InstEqContext2.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs b/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs
new file mode 100644
index 0000000000..c5d017a644
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/InstEqContext2.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE TypeFamilies, EmptyDataDecls #-}
+
+module InstEqContext2 where
+
+data E v a = E a
+data RValue
+
+instance (Eq a, v ~ RValue) => Eq (E v a) where
+ E x == E y = x == y
+
+a :: E v Int
+a = undefined
+
+foo = a == a
+