summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@richarde.dev>2019-11-07 17:56:16 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-11-10 01:06:48 -0500
commit55ca10855713f3cc14b17f1b67f14c36dea4c651 (patch)
tree398764b7a0bdde6aa2e28ccb234b430b80a84109 /testsuite/tests/deriving
parentfa25c8c49464c3306b8c166fecc2bf5686d21996 (diff)
downloadhaskell-55ca10855713f3cc14b17f1b67f14c36dea4c651.tar.gz
Fix #17405 by not checking imported equations
Previously, we checked all imported type family equations for injectivity. This is very silly. Now, we check only for conflicts. Before I could even imagine doing the fix, I needed to untangle several functions that were (in my opinion) overly complicated. It's still not quite as perfect as I'd like, but it's good enough for now. Test case: typecheck/should_compile/T17405
Diffstat (limited to 'testsuite/tests/deriving')
-rw-r--r--testsuite/tests/deriving/should_fail/T8165_fail1.stderr5
1 files changed, 3 insertions, 2 deletions
diff --git a/testsuite/tests/deriving/should_fail/T8165_fail1.stderr b/testsuite/tests/deriving/should_fail/T8165_fail1.stderr
index 43bca52aa5..c47ed702f4 100644
--- a/testsuite/tests/deriving/should_fail/T8165_fail1.stderr
+++ b/testsuite/tests/deriving/should_fail/T8165_fail1.stderr
@@ -7,11 +7,12 @@ T8165_fail1.hs:17:12: error:
• In the newtype declaration for ‘MyInt’
T8165_fail1.hs:25:8: error:
- Type family equations violate injectivity annotation:
+ Type family equation right-hand sides overlap; this violates
+ the family's injectivity annotation:
S Int = Char -- Defined at T8165_fail1.hs:25:8
S WrappedInt = S Int -- Defined at T8165_fail1.hs:28:12
T8165_fail1.hs:28:12: error:
- Type family equation violates injectivity annotation.
+ Type family equation violates the family's injectivity annotation.
RHS of injective type family equation cannot be a type family:
S WrappedInt = S Int -- Defined at T8165_fail1.hs:28:12