diff --git a/testsuite/tests/typecheck/should_compile/T6011.hs b/testsuite/tests/typecheck/should_compile/T6011.hs new file mode 100644 index 0000000000000000000000000000000000000000..867d69b2fd60614183b6e768b01264b7b19693ea --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T6011.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE DataKinds, FlexibleInstances, ScopedTypeVariables, TypeFamilies #-} + +module T6011 where + +data family GenMod :: Modulus * -> * -> * + +type Mod n = GenMod (FiniteRing n) Integer + +data Modulus n = FiniteRing n + +data instance GenMod (FiniteRing n) Integer = Mod Integer Integer diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 918d5c8c2ee9f3f7d2a1d9b8d53d5afb58c3b48c..bccb1fa550851f987a57e373729fdf42c0c63c96 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -376,4 +376,5 @@ test('T3108', normal, compile, ['']) test('T5792',normal,run_command, ['$MAKE -s --no-print-directory T5792']) -test('PolytypeDecomp', normal, compile, ['']) \ No newline at end of file +test('PolytypeDecomp', normal, compile, ['']) +test('T6011', normal, compile, [''])