diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-05-17 11:34:04 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-05-17 11:34:51 +0100 |
commit | dddb689f6dd16e19de649043d34dc1712973c639 (patch) | |
tree | c90407da62b70c0e2fd7922a7971b399b339f6f7 | |
parent | 5f6527e05beb628c5015ab9f8a7f4012ee8d14a1 (diff) | |
download | haskell-wip/t21355.tar.gz |
Add test for #21558wip/t21355
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']) |