diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-12-02 15:13:32 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-12-02 15:13:32 +0000 |
commit | c41d214a8dd8e2fe7ae9a3446aeda1a07328b831 (patch) | |
tree | 8667f3709837f3087a9653468bc2b0b6bc10b462 /testsuite/tests/deriving | |
parent | 863854a3a490afd9e3ecf0da6294a3b078f4a6a1 (diff) | |
download | haskell-c41d214a8dd8e2fe7ae9a3446aeda1a07328b831.tar.gz |
Unique-ify the names of top-level auxiliary bindings in derived instances (Trac #7947)
The problem and its solution are explained in
Note [Auxiliary binders]
in TcGenDeriv
Diffstat (limited to 'testsuite/tests/deriving')
-rw-r--r-- | testsuite/tests/deriving/should_compile/T7947.hs | 16 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_compile/T7947a.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_compile/T7947b.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_compile/all.T | 1 |
4 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T7947.hs b/testsuite/tests/deriving/should_compile/T7947.hs new file mode 100644 index 0000000000..d4df4353e5 --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T7947.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE StandaloneDeriving #-} + +module T7947 where + +import Data.Data +import Data.Typeable + +import T7947a +import qualified T7947b as B + +deriving instance Typeable A +deriving instance Typeable B.B + +deriving instance Data A +deriving instance Data B.B diff --git a/testsuite/tests/deriving/should_compile/T7947a.hs b/testsuite/tests/deriving/should_compile/T7947a.hs new file mode 100644 index 0000000000..eb5c7472a0 --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T7947a.hs @@ -0,0 +1,3 @@ +module T7947a where + +data A = C1 | C2 | C diff --git a/testsuite/tests/deriving/should_compile/T7947b.hs b/testsuite/tests/deriving/should_compile/T7947b.hs new file mode 100644 index 0000000000..f17f1cd674 --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T7947b.hs @@ -0,0 +1,3 @@ +module T7947b where + +data B = D1 | D2 | C diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T index 2234dd552e..8d9023646c 100644 --- a/testsuite/tests/deriving/should_compile/all.T +++ b/testsuite/tests/deriving/should_compile/all.T @@ -52,4 +52,5 @@ test('T7269', normal, compile, ['']) test('T9069', normal, compile, ['']) test('T9359', normal, compile, ['']) test('T4896', normal, compile, ['']) +test('T7947', extra_clean(['T7947a.o', 'T7947a.hi', 'T7947b.o', 'T7947b.hi']), multimod_compile, ['T7947', '-v0']) |