diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-05-17 11:34:04 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-05-17 16:00:50 -0400 |
commit | 0e2d16eb76037152c96226f0f65a5ebdee64f7b6 (patch) | |
tree | 545d805c52f453f896467171e5543bc9e8435182 | |
parent | b048a9f4e28186d2245427d2d83f08418573fae5 (diff) | |
download | haskell-0e2d16eb76037152c96226f0f65a5ebdee64f7b6.tar.gz |
Add test for #21558
This is now fixed on master and 9.2 branch.
Closes #21558
-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']) |