diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-10-01 15:24:41 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-10-08 15:55:08 -0700 |
commit | 931d0a7d1cd296f8c2a6190a06a2d3dcc8996ac3 (patch) | |
tree | aae7530fdcdef2ae332a84d85ead11882941656d /testsuite | |
parent | f64f7c36ef9395da1cc7b686aaf1b019204cd0fc (diff) | |
download | haskell-931d0a7d1cd296f8c2a6190a06a2d3dcc8996ac3.tar.gz |
Move orphan instance/rule warnings to typechecker/desugarer.
Summary:
Instead of doing these warnings at MkIface time, we do them
when we create the instances/rules in the typechecker/desugarer.
Emitting warnings for auto-generated instances was a pain
(since the specialization monad doesn't have the capacity
to emit warnings) so instead I just deprecated -fwarn-auto-orphans.
Auto rule orphans are pretty harmless anyway: they don't cause
interface files to be eagerly loaded in.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1297
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T4912.stderr | 8 | ||||
-rw-r--r-- | testsuite/tests/warnings/should_compile/T9178.stderr | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T4912.stderr b/testsuite/tests/typecheck/should_compile/T4912.stderr index 855d365db5..02ff1ad40e 100644 --- a/testsuite/tests/typecheck/should_compile/T4912.stderr +++ b/testsuite/tests/typecheck/should_compile/T4912.stderr @@ -1,12 +1,12 @@ -T4912.hs:10:10: warning: - Orphan instance: instance [safe] Foo TheirData +T4912.hs:10:1: warning: + Orphan instance: instance Foo TheirData To avoid this move the instance declaration to the module of the class or of the type, or wrap the type with a newtype and declare the instance on the new type. -T4912.hs:13:10: warning: - Orphan instance: instance [safe] Bar OurData +T4912.hs:13:1: warning: + Orphan instance: instance Bar OurData To avoid this move the instance declaration to the module of the class or of the type, or wrap the type with a newtype and declare the instance on the new type. diff --git a/testsuite/tests/warnings/should_compile/T9178.stderr b/testsuite/tests/warnings/should_compile/T9178.stderr index c1e99bc516..d22f428763 100644 --- a/testsuite/tests/warnings/should_compile/T9178.stderr +++ b/testsuite/tests/warnings/should_compile/T9178.stderr @@ -1,8 +1,8 @@ [1 of 2] Compiling T9178DataType ( T9178DataType.hs, T9178DataType.o ) [2 of 2] Compiling T9178 ( T9178.hs, T9178.o ) -T9178.hs:8:10: warning: - Orphan instance: instance [safe] Show T9178_Type +T9178.hs:8:1: warning: + Orphan instance: instance Show T9178_Type To avoid this move the instance declaration to the module of the class or of the type, or wrap the type with a newtype and declare the instance on the new type. |