summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-09-26 01:02:28 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-26 13:19:36 -0400
commite124f2a7d9a5932a4c2383fd3f9dd772b2059885 (patch)
tree87e1161f0c0c7b9d076d67c638e19be7c3a40909 /compiler
parent160fba4aa306c0649c72a6dcd7c98d9782a0e74b (diff)
downloadhaskell-e124f2a7d9a5932a4c2383fd3f9dd772b2059885.tar.gz
Fix handling of function coercions (#18747)
This was broken when we added multiplicity to the function type.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/Core/Coercion.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Coercion.hs b/compiler/GHC/Core/Coercion.hs
index 47e6d40173..6ba6c0f144 100644
--- a/compiler/GHC/Core/Coercion.hs
+++ b/compiler/GHC/Core/Coercion.hs
@@ -1486,7 +1486,7 @@ instCoercion (Pair lty rty) g w
| isFunTy lty && isFunTy rty
-- g :: (t1 -> t2) ~ (t3 -> t4)
-- returns t2 ~ t4
- = Just $ mkNthCo Nominal 3 g -- extract result type, which is the 4th argument to (->)
+ = Just $ mkNthCo Nominal 4 g -- extract result type, which is the 5th argument to (->)
| otherwise -- one forall, one funty...
= Nothing