diff options
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T21558.hs | 16 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T21558.hs b/testsuite/tests/typecheck/should_compile/T21558.hs new file mode 100644 index 0000000000..156590e640 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T21558.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE UndecidableInstances #-} +module T21558 where + +import Data.Map + +type family IxValue (m :: *) :: * +type family Index (m :: *) :: * + +data Op a where + Insert :: (a ~ Map (Index a) (IxValue a)) => (Int, Index a, IxValue a) -> Op a + +instance Eq (Op a) where + +instance (Ord (Index a), Ord (IxValue a), Ord a) => Ord (Op a) where + compare (Insert a1) (Insert b1) = compare a1 b1 diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 4f546c0914..e9596fb6f4 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -804,6 +804,7 @@ test('T20187a', normal, compile, ['-Wredundant-strictness-flags']) test('T20187b', normal, compile, ['-Wredundant-strictness-flags']) test('T20356', normal, compile, ['']) test('T20584', normal, compile, ['']) +test('T21558', normal, compile, ['-w']) test('T20584b', normal, compile, ['']) test('T20588b', [extra_files(['T20588b.hs', 'T20588b.hs-boot', 'T20588b_aux.hs'])], multimod_compile, ['T20588b_aux.hs', '-v0']) test('T20588d', [extra_files(['T20588d.hs', 'T20588d.hs-boot', 'T20588d_aux.hs'])], multimod_compile, ['T20588d_aux.hs', '-v0']) |