diff options
Diffstat (limited to 'testsuite/tests/deriving/should_compile')
-rw-r--r-- | testsuite/tests/deriving/should_compile/T17339.hs | 17 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_compile/T17339.stderr | 23 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_compile/all.T | 2 |
3 files changed, 42 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T17339.hs b/testsuite/tests/deriving/should_compile/T17339.hs new file mode 100644 index 0000000000..4312d2ffc4 --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T17339.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE DeriveAnyClass #-} +{-# LANGUAGE DerivingStrategies #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE StandaloneDeriving #-} +module T17339 where + +class Cls a b +data A1 +data A2 +data B1 +data B2 + +instance Cls A1 B1 +instance Cls A2 B1 + +deriving anyclass instance Cls A1 B2 +deriving anyclass instance Cls A2 B2 diff --git a/testsuite/tests/deriving/should_compile/T17339.stderr b/testsuite/tests/deriving/should_compile/T17339.stderr new file mode 100644 index 0000000000..68da373ae4 --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T17339.stderr @@ -0,0 +1,23 @@ + +==================== Tidy Core ==================== +Result size of Tidy Core + = {terms: 8, types: 20, coercions: 0, joins: 0/0} + +-- RHS size: {terms: 1, types: 2, coercions: 0, joins: 0/0} +T17339.$fClsA1B1 :: Cls A1 B1 +T17339.$fClsA1B1 = T17339.C:Cls @ A1 @ B1 + +-- RHS size: {terms: 1, types: 2, coercions: 0, joins: 0/0} +T17339.$fClsA2B1 :: Cls A2 B1 +T17339.$fClsA2B1 = T17339.C:Cls @ A2 @ B1 + +-- RHS size: {terms: 1, types: 2, coercions: 0, joins: 0/0} +T17339.$fClsA1B2 :: Cls A1 B2 +T17339.$fClsA1B2 = T17339.C:Cls @ A1 @ B2 + +-- RHS size: {terms: 1, types: 2, coercions: 0, joins: 0/0} +T17339.$fClsA2B2 :: Cls A2 B2 +T17339.$fClsA2B2 = T17339.C:Cls @ A2 @ B2 + + + diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T index 04fd02518f..55c7d90f09 100644 --- a/testsuite/tests/deriving/should_compile/all.T +++ b/testsuite/tests/deriving/should_compile/all.T @@ -119,3 +119,5 @@ test('T15831', normal, compile, ['']) test('T16179', normal, compile, ['']) test('T16518', normal, compile, ['']) test('T17324', normal, compile, ['']) +test('T17339', normal, compile, + ['-ddump-simpl -dsuppress-idinfo -dno-typeable-binds']) |